hasktorch-gradually-typed-0.2.0.0: experimental project for hasktorch
Safe HaskellSafe-Inferred
LanguageHaskell2010

Torch.GraduallyTyped

Documentation

module Torch.Data

class HasGrad parameters where Source #

Associated Types

type Gradients parameters :: Type Source #

type Loss parameters :: Type 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

Instances details
HasGrad (Tensor ('Gradient 'WithGradient) layout device dataType shape) Source # 
Instance details

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 #