hasktorch-0.2.0.0: Functional differentiable programming in Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Torch.Index

Synopsis

Documentation

slice :: QuasiQuoter Source #

Generate a slice from a python compatible expression. When you take the odd-numbered element of tensor with `tensor[1::2]` in python, you can write `tensor ! [slice|1::2|]` in hasktorch.

lslice :: QuasiQuoter Source #

Generate a lens from a python compatible expression. When you take the odd-numbered elements of tensor with `tensor[1::2]` in python, you can write `tensor ^. [lslice|1::2|]` in hasktorch. When you put 2 in the odd numbered elements of the tensor, you can write `tensor & [lslice|1::2|] ~. 2`.