Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
class HasGrad parameters where Source #
grad :: Loss parameters -> parameters -> Gradients parameters Source #
calculate gradients of a zero-dimensional tensor with respect to a list of independent tensor parameters
Instances
HasGrad (Tensor ('Gradient 'WithGradient) layout device dataType shape) Source # | |
Defined in Torch.GraduallyTyped.Autograd type Gradients (Tensor ('Gradient 'WithGradient) layout device dataType shape) Source # type Loss (Tensor ('Gradient 'WithGradient) layout device dataType shape) Source # grad :: Loss (Tensor ('Gradient 'WithGradient) layout device dataType shape) -> Tensor ('Gradient 'WithGradient) layout device dataType shape -> Gradients (Tensor ('Gradient 'WithGradient) layout device dataType shape) Source # |