factory module#
- class factory.IGANFactory(parser: ConfigParser)[source]#
 Bases:
ABCFactory that represents a GAN. This factory does not keep of created references.
- __init__(parser: ConfigParser) None[source]#
 Initialize the factory.
- Parameters:
 parser (ConfigParser) – Parser for config file containing GAN model and training params.
- abstract get_trainer() Callable[source]#
 Returns the GAN train function.
- Returns:
 GAN train() function.
- Return type:
 Callable
- _abc_impl = <_abc._abc_data object>#
 
- class factory.GANFactory(parser: ConfigParser)[source]#
 Bases:
IGANFactory- get_trainer() Callable[source]#
 Returns the GAN train function.
- Returns:
 GAN train() function.
- Return type:
 Callable
- _abc_impl = <_abc._abc_data object>#
 
- class factory.ConditionalCatGANFactory(parser: ConfigParser)[source]#
 Bases:
IGANFactory- get_gan() ConditionalCatGAN[source]#
 Returns a GAN instance
- Returns:
 GAN instance.
- Return type:
 
- get_trainer() Callable[source]#
 Returns the GAN train function.
- Returns:
 GAN train() function.
- Return type:
 Callable
- _abc_impl = <_abc._abc_data object>#
 
- class factory.ConditionalProjGANFactory(parser: ConfigParser)[source]#
 Bases:
IGANFactory- get_gan() ConditionalProjGAN[source]#
 Returns a GAN instance
- Returns:
 GAN instance.
- Return type:
 
- get_trainer() Callable[source]#
 Returns the GAN train function.
- Returns:
 GAN train() function.
- Return type:
 Callable
- _abc_impl = <_abc._abc_data object>#
 
- class factory.CausalGANFactory(parser: ConfigParser)[source]#
 Bases:
IGANFactory- get_trainer() Callable[source]#
 Returns the GAN train function.
- Returns:
 GAN train() function.
- Return type:
 Callable
- _abc_impl = <_abc._abc_data object>#
 
- factory.get_factory(cfg: ConfigParser) IGANFactory[source]#
 Return the factory for the GAN type based on ‘model’ key in the parser.
- Parameters:
 cfg (ConfigParser) – Parser for config file containing GAN model and training params.
- Returns:
 Factory for the specified GAN.
- Return type:
 - Raises:
 ValueError – If the model is unknown or not implemented.