pygan.discriminativemodel.cnnmodel package

Submodules

pygan.discriminativemodel.cnnmodel.seq_cnn_model module

class pygan.discriminativemodel.cnnmodel.seq_cnn_model.SeqCNNModel(batch_size, layerable_cnn_list, cnn_output_graph, learning_rate=1e-05, computable_loss=None, opt_params=None, verificatable_result=None, cnn=None, feature_matching_layer=0)[source]

Bases: pygan.discriminativemodel.cnn_model.CNNModel

Convolutional Neural Network as a Discriminator.

This model observes sequencal data as image-like data.

If the length of sequence is T and the dimension is D, image-like matrix will be configured as a T × D matrix.

feature_matching_forward(observed_arr)[source]

Forward propagation in only first or intermediate layer for so-called Feature matching.

Parameters:observed_arrnp.ndarray of observed data points.
Returns:np.ndarray of outputs.
inference(observed_arr)[source]

Draws samples from the true distribution.

Parameters:observed_arrnp.ndarray of observed data points.
Returns:np.ndarray of inferenced.
learn(grad_arr, fix_opt_flag=False)[source]

Update this Discriminator by ascending its stochastic gradient.

Parameters:
  • grad_arrnp.ndarray of gradients.
  • fix_opt_flag – If False, no optimization in this model will be done.
Returns:

np.ndarray of delta or gradients.

Module contents