Korean
언어
English
Bengali
French
Hindi
Italian
Japanese
Korean
Malayalam
Russian
Spanish
Tamil
Turkish
Vietnamese
Shortcuts



PyTorchDiscriminator

class PyTorchDiscriminator(n_features=1, n_out=1)[소스]

기반 클래스: qiskit_machine_learning.algorithms.distribution_learners.qgan.discriminative_network.DiscriminativeNetwork

Discriminator based on PyTorch

매개변수
  • n_features (int) – Dimension of input data vector.

  • n_out (int) – Dimension of the discriminator’s output vector.

예외 발생

MissingOptionalLibraryError – Pytorch not installed

Attributes

discriminator_net

Get discriminator

Methods

get_label(x[, detach])

Get data sample labels, i.e. true or fake.

gradient_penalty(x[, lambda_, k, c])

Compute gradient penalty for discriminator optimization

load_model(load_dir)

Load discriminator model

loss(x, y[, weights])

Loss function

save_model(snapshot_dir)

Save discriminator model

set_seed(seed)

Set seed.

train(data, weights[, penalty, ...])

Perform one training step w.r.t to the discriminator's parameters