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



OneHotObjectiveFunction

class OneHotObjectiveFunction(X, y, neural_network, loss)[sorgente]

An objective function for one hot encoding representation of the output, e.g. classes like [1, 0, 0], [0, 1, 0], [0, 0, 1].

Parametri
  • X (ndarray) – The input data.

  • y (ndarray) – The target values.

  • neural_network (NeuralNetwork) – An instance of an quantum neural network to be used by this objective function.

  • loss (Loss) – A target loss function to be used in training.

Methods

gradient(weights)

Computes gradients of this objective function given weights.

objective(weights)

Computes the value of this objective function given weights.