vegans.utils.loading.architectures package¶
Submodules¶
vegans.utils.loading.architectures.celeba module¶
-
class
vegans.utils.loading.architectures.celeba.
MyAdversary
(adv_in_dim, last_layer_activation)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
class
vegans.utils.loading.architectures.celeba.
MyDecoder
(x_dim, dec_in_dim)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
class
vegans.utils.loading.architectures.celeba.
MyEncoder
(enc_in_dim, z_dim)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
class
vegans.utils.loading.architectures.celeba.
MyGenerator
(x_dim, gen_in_dim)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
vegans.utils.loading.architectures.celeba.
load_celeba_adversary
(x_dim, y_dim=None, adv_type='Critic')[source]¶ Load some celeba architecture for the adversary.
- Parameters
y_dim (integer, list, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for adversary.
- Return type
torch.nn.Module
-
vegans.utils.loading.architectures.celeba.
load_celeba_decoder
(x_dim, z_dim, y_dim=None)[source]¶ Load some mnist architecture for the decoder.
- Parameters
z_dim (integer, list) – Indicating the number of dimensions for the latent space.
y_dim (integer, list, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for decoder.
- Return type
torch.nn.Module
-
vegans.utils.loading.architectures.celeba.
load_celeba_encoder
(x_dim, z_dim, y_dim=None)[source]¶ Load some celeba architecture for the encoder.
- Parameters
x_dim (integer, list) – Indicating the number of dimensions for the real data.
z_dim (integer, list) – Indicating the number of dimensions for the latent space.
y_dim (integer, list, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for encoder.
- Return type
torch.nn.Module
-
vegans.utils.loading.architectures.celeba.
load_celeba_generator
(x_dim, z_dim, y_dim=None)[source]¶ Load some celeba architecture for the generator.
- Parameters
z_dim (integer, list) – Indicating the number of dimensions for the latent space.
y_dim (None, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for generator,.
- Return type
torch.nn.Module
vegans.utils.loading.architectures.example module¶
-
class
vegans.utils.loading.architectures.example.
MyAdversary
(adv_in_dim, first_layer, last_layer)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
class
vegans.utils.loading.architectures.example.
MyAutoEncoder
(adv_in_dim, x_dim, first_layer)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
class
vegans.utils.loading.architectures.example.
MyDecoder
(x_dim, dec_in_dim)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
class
vegans.utils.loading.architectures.example.
MyEncoder
(enc_in_dim, z_dim, first_layer)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
class
vegans.utils.loading.architectures.example.
MyGenerator
(gen_in_dim, x_dim)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
vegans.utils.loading.architectures.example.
load_example_adversary
(x_dim, y_dim=None, adv_type='Critic')[source]¶ Load some example architecture for the adversary.
- Parameters
x_dim (integer, list) – Indicating the number of dimensions for the real data.
y_dim (integer, list, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for adversary.
- Return type
torch.nn.Module
-
vegans.utils.loading.architectures.example.
load_example_autoencoder
(x_dim, y_dim=None)[source]¶ Load some example architecture for the auto-encoder.
- Parameters
x_dim (integer, list) – Indicating the number of dimensions for the real data.
y_dim (integer, list, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for autoencoder.
- Return type
torch.nn.Module
-
vegans.utils.loading.architectures.example.
load_example_decoder
(x_dim, z_dim, y_dim=None)[source]¶ Load some example architecture for the decoder.
- Parameters
x_dim (integer, list) – Indicating the number of dimensions for the real data.
z_dim (integer, list) – Indicating the number of dimensions for the latent space.
y_dim (None, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for decoder.
- Return type
torch.nn.Module
-
vegans.utils.loading.architectures.example.
load_example_encoder
(x_dim, z_dim, y_dim=None)[source]¶ Load some example architecture for the encoder.
- Parameters
x_dim (integer, list) – Indicating the number of dimensions for the real data.
z_dim (integer, list) – Indicating the number of dimensions for the latent space.
y_dim (None, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for encoder.
- Return type
torch.nn.Module
-
vegans.utils.loading.architectures.example.
load_example_generator
(x_dim, z_dim, y_dim=None)[source]¶ Load some example architecture for the generator.
- Parameters
x_dim (integer, list) – Indicating the number of dimensions for the real data.
z_dim (integer, list) – Indicating the number of dimensions for the latent space.
y_dim (integer, list, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for generator,.
- Return type
torch.nn.Module
vegans.utils.loading.architectures.mnist module¶
-
class
vegans.utils.loading.architectures.mnist.
MyAdversary
(adv_in_dim, last_layer)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
class
vegans.utils.loading.architectures.mnist.
MyAutoEncoder
(ae_in_dim)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
class
vegans.utils.loading.architectures.mnist.
MyDecoder
(x_dim, dec_in_dim)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
class
vegans.utils.loading.architectures.mnist.
MyEncoder
(enc_in_dim, z_dim)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
class
vegans.utils.loading.architectures.mnist.
MyGenerator
(x_dim, gen_in_dim)[source]¶ Bases:
torch.nn.modules.module.Module
-
forward
(x)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training
: bool¶
-
-
vegans.utils.loading.architectures.mnist.
load_mnist_adversary
(x_dim=(1, 32, 32), y_dim=None, adv_type='Critic')[source]¶ Load some mnist architecture for the adversary.
- Parameters
y_dim (integer, list, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for adversary.
- Return type
torch.nn.Module
-
vegans.utils.loading.architectures.mnist.
load_mnist_autoencoder
(x_dim=(1, 32, 32), y_dim=None)[source]¶ Load some mnist architecture for the auto-encoder.
- Parameters
x_dim (integer, list) – Indicating the number of dimensions for the real data.
y_dim (integer, list, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for autoencoder.
- Return type
torch.nn.Module
-
vegans.utils.loading.architectures.mnist.
load_mnist_decoder
(x_dim, z_dim, y_dim=None)[source]¶ Load some mnist architecture for the decoder.
- Parameters
z_dim (integer, list) – Indicating the number of dimensions for the latent space.
y_dim (integer, list, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for decoder.
- Return type
torch.nn.Module
-
vegans.utils.loading.architectures.mnist.
load_mnist_encoder
(x_dim, z_dim, y_dim=None)[source]¶ Load some mnist architecture for the encoder.
- Parameters
x_dim (integer, list) – Indicating the number of dimensions for the real data.
z_dim (integer, list) – Indicating the number of dimensions for the latent space.
y_dim (integer, list, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for encoder.
- Return type
torch.nn.Module
-
vegans.utils.loading.architectures.mnist.
load_mnist_generator
(x_dim, z_dim, y_dim=None)[source]¶ Load some mnist architecture for the generator.
- Parameters
z_dim (integer, list) – Indicating the number of dimensions for the latent space.
y_dim (None, optional) – Indicating the number of dimensions for the labels.
- Returns
Architectures for generator,.
- Return type
torch.nn.Module