analogvnn.backward.BackwardUsingForward
#
Module Contents#
Classes#
The backward module that uses the forward function to compute the backward gradient. |
- class analogvnn.backward.BackwardUsingForward.BackwardUsingForward(layer: torch.nn.Module = None)[source]#
Bases:
analogvnn.backward.BackwardModule.BackwardModule
,abc.ABC
The backward module that uses the forward function to compute the backward gradient.
- backward(*grad_output: torch.Tensor, **grad_output_kwarg: torch.Tensor) analogvnn.utils.common_types.TENSORS [source]#
Computes the backward gradient of inputs with respect to outputs using the forward function.
- Parameters:
*grad_output (Tensor) – The gradients of the output of the layer.
**grad_output_kwarg (Tensor) – The gradients of the output of the layer.
- Returns:
The gradients of the input of the layer.
- Return type:
TENSORS