Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Torch.GraduallyTyped.Autograd
Documentation
class HasGrad parameters where Source #
Methods
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 Associated Types type Gradients (Tensor ('Gradient 'WithGradient) layout device dataType shape) Source # type Loss (Tensor ('Gradient 'WithGradient) layout device dataType shape) Source # Methods 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 # |