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

Torch.Lens

Synopsis

Documentation

type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f t Source #

Type synonym for lens

type Lens' s a = Lens s s a a Source #

type Traversal s t a b = forall f. Applicative f => (a -> f b) -> s -> f t Source #

type Traversal' s a = Traversal s s a a Source #

class HasTypes s a where Source #

Minimal complete definition

Nothing

Methods

types_ :: Traversal' s a Source #

default types_ :: (Generic s, GHasTypes (Rep s) a) => Traversal' s a Source #

Instances

Instances details
HasTypes Tensor Tensor Source # 
Instance details

Defined in Torch.Tensor

HasTypes Bool Tensor Source # 
Instance details

Defined in Torch.Tensor

HasTypes Bool Bool Source # 
Instance details

Defined in Torch.Tensor

HasTypes Double Tensor Source # 
Instance details

Defined in Torch.Tensor

HasTypes Double Double Source # 
Instance details

Defined in Torch.Tensor

HasTypes Float Tensor Source # 
Instance details

Defined in Torch.Tensor

HasTypes Float Float Source # 
Instance details

Defined in Torch.Tensor

HasTypes Int Tensor Source # 
Instance details

Defined in Torch.Tensor

HasTypes Int Int Source # 
Instance details

Defined in Torch.Tensor

(Generic s, GHasTypes (Rep s) a) => HasTypes s a Source # 
Instance details

Defined in Torch.Lens

Methods

types_ :: Traversal' s a Source #

HasTypes s a => HasTypes [s] a Source # 
Instance details

Defined in Torch.Lens

Methods

types_ :: Traversal' [s] a Source #

HasTypes (a -> a) Tensor Source # 
Instance details

Defined in Torch.Tensor

Methods

types_ :: Traversal' (a -> a) Tensor Source #

(HasTypes s0 a, HasTypes s1 a) => HasTypes (s0, s1) a Source # 
Instance details

Defined in Torch.Lens

Methods

types_ :: Traversal' (s0, s1) a Source #

(HasTypes s0 a, HasTypes s1 a, HasTypes s2 a) => HasTypes (s0, s1, s2) a Source # 
Instance details

Defined in Torch.Lens

Methods

types_ :: Traversal' (s0, s1, s2) a Source #

over :: Traversal' s a -> (a -> a) -> s -> s Source #

flattenValues :: forall a s. Traversal' s a -> s -> [a] Source #

replaceValues :: forall a s. Traversal' s a -> s -> [a] -> s Source #

types :: forall a s. HasTypes s a => Traversal' s a Source #

class GHasTypes s a where Source #

Methods

gtypes :: forall b. Traversal' (s b) a Source #

Instances

Instances details
GHasTypes (U1 :: Type -> Type) a Source # 
Instance details

Defined in Torch.Lens

Methods

gtypes :: Traversal' (U1 b) a Source #

(GHasTypes f a, GHasTypes g a) => GHasTypes (f :*: g) a Source # 
Instance details

Defined in Torch.Lens

Methods

gtypes :: Traversal' ((f :*: g) b) a Source #

(GHasTypes f a, GHasTypes g a) => GHasTypes (f :+: g) a Source # 
Instance details

Defined in Torch.Lens

Methods

gtypes :: Traversal' ((f :+: g) b) a Source #

HasTypes s a => GHasTypes (K1 i s :: Type -> Type) a Source # 
Instance details

Defined in Torch.Lens

Methods

gtypes :: Traversal' (K1 i s b) a Source #

GHasTypes s a => GHasTypes (M1 i t s) a Source # 
Instance details

Defined in Torch.Lens

Methods

gtypes :: Traversal' (M1 i t s b) a Source #