tensornn.loss.Poisson
- class tensornn.loss.Poisson
Bases:
LossPoisson loss is calculated with this formula: average of (pred-desired*logₑ(pred))
Methods
The loss function is used to calculate how off the predictions of the network are.
Used in backpropagation which helps calculates how much each neuron impacts the loss.
source- __repr__()
Return repr(self).
- calculate(pred: Tensor, desired: Tensor) Tensor
The loss function is used to calculate how off the predictions of the network are.
- Parameters:
pred – the prediction of the network
desired – the desired values which the network should have gotten close to
- Returns:
the average of calculated loss for one whole pass of the network
- abstractmethod derivative(pred: Tensor, desired: Tensor) Tensor
Used in backpropagation which helps calculates how much each neuron impacts the loss.
- Parameters:
pred – the prediction of the network
desired – the desired values which the network should have gotten close to
- Returns:
the derivative of the loss function wrt the last layer of the network