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

Torch.GraduallyTyped.NN.Functional.Loss

Synopsis
  • mseLoss :: forall m gradient layout device dataType shape gradient' layout' device' dataType' shape'. (MonadThrow m, Catch (shape <+> shape')) => Tensor gradient layout device dataType shape -> Tensor gradient' layout' device' dataType' shape' -> m (Tensor (gradient <|> gradient') (layout <+> layout') (device <+> device') (dataType <+> dataType') ('Shape '[]))

Documentation

mseLoss Source #

Arguments

:: forall m gradient layout device dataType shape gradient' layout' device' dataType' shape'. (MonadThrow m, Catch (shape <+> shape')) 
=> Tensor gradient layout device dataType shape

prediction tensor

-> Tensor gradient' layout' device' dataType' shape'

target tensor

-> m (Tensor (gradient <|> gradient') (layout <+> layout') (device <+> device') (dataType <+> dataType') ('Shape '[]))

output tensor

Compute the mean squared error between two tensors.