pygan.generativeadversarialnetworks package¶
Submodules¶
pygan.generativeadversarialnetworks.adversarial_auto_encoders module¶
-
class
pygan.generativeadversarialnetworks.adversarial_auto_encoders.
AdversarialAutoEncoders
(gans_value_function=None, feature_matching=False)[source]¶ Bases:
pygan.generative_adversarial_networks.GenerativeAdversarialNetworks
The controller for the Adversarial Auto-Encoders(AAEs).
-
extract_logs_tuple
()[source]¶ Extract update logs data.
Returns: - list of the reconstruction errors.
- list of probabilities inferenced by the discriminator (mean) in the discriminator’s update turn.
- list of probabilities inferenced by the discriminator (mean) in the generator’s update turn.
Return type: The shape is
-
pre_train
(generative_model, epochs=300)[source]¶ Pre-train.
Parameters: - generative_model – Generator which draws samples from the fake distribution.
- epochs – Epochs.
- Returnes:
- Tuple data. -trained Generator which is-a GenerativeModel. - list of the reconstruction errors.
-
train
(true_sampler, generative_model, discriminative_model, iter_n=100, k_step=10)[source]¶ Train.
Parameters: - true_sampler – Sampler which draws samples from the true distribution.
- generative_model – Generator which draws samples from the fake distribution.
- discriminative_model – Discriminator which discriminates true from fake.
- iter_n – The number of training iterations.
- k_step – The number of learning of the discriminative_model.
Returns: Tuple data. - trained Generator which is-a GenerativeModel. - trained Discriminator which is-a DiscriminativeModel.
-
train_auto_encoder
(generative_model, a_logs_list)[source]¶ Train the generative model as the Auto-Encoder.
Parameters: - generative_model – Generator which draws samples from the fake distribution.
- a_logs_list – list of the reconstruction errors.
Returns: The tuple data. The shape is… - Generator which draws samples from the fake distribution. - list of the reconstruction errors.
-