PyTorchDiscriminator.train¶
- PyTorchDiscriminator.train(data, weights, penalty=True, quantum_instance=None, shots=None)[source]¶
Perform one training step w.r.t. to the discriminator’s parameters
- Parameters
data (tuple) – real_batch: torch.Tensor, Training data batch. generated_batch: numpy array, Generated data batch.
weights (tuple) – real problem, generated problem
penalty (bool) – Indicate whether or not penalty function is applied to the loss function.
quantum_instance (QuantumInstance) – Quantum Instance (depreciated)
shots (int) – Number of shots for hardware or qasm execution. Not used for classical network (only quantum ones)
- Returns
with Discriminator loss (torch.Tensor) and updated parameters (array).
- Return type
dict