Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
class HasName (name :: Type -> Type) shape where Source #
Nothing
name :: Traversal' (NamedTensor device dtype shape) (NamedTensor device dtype (DropName name shape)) Source #
default name :: KnownNat (NamedIdx name shape) => Traversal' (NamedTensor device dtype shape) (NamedTensor device dtype (DropName name shape)) Source #
Instances
KnownNat (NamedIdx name shape) => HasName name shape Source # | |
Defined in Torch.Typed.Lens name :: forall (device :: (DeviceType, Nat)) (dtype :: DType). Traversal' (NamedTensor device dtype shape) (NamedTensor device dtype (DropName name shape)) Source # |
class HasField (field :: Symbol) shape where Source #
Nothing
field :: Lens' (NamedTensor device dtype shape) (NamedTensor device dtype (DropField field shape)) Source #
default field :: FieldIdx field shape => Lens' (NamedTensor device dtype shape) (NamedTensor device dtype (DropField field shape)) Source #
Instances
FieldIdx field shape => HasField field shape Source # | |
Defined in Torch.Typed.Lens field :: forall (device :: (DeviceType, Nat)) (dtype :: DType). Lens' (NamedTensor device dtype shape) (NamedTensor device dtype (DropField field shape)) Source # |
type family GHasField (field :: Symbol) f :: Bool where ... Source #
GHasField field (S1 ('MetaSel ('Just field) _ _ _) _) = 'True | |
GHasField field (S1 ('MetaSel _ _ _ _) _) = 'False | |
GHasField field (D1 _ f) = GHasField field f | |
GHasField field (C1 _ f) = GHasField field f | |
GHasField field (l :*: r) = GHasField field l || GHasField field r | |
GHasField field (l :+: r) = GHasField field l || GHasField field r | |
GHasField field (K1 _ _) = 'False | |
GHasField field U1 = 'False | |
GHasField field (Vector n) = 'False | |
GHasField field a = GHasField field (Rep (a ())) |
type family DropName (name :: Type -> Type) (a :: [Type -> Type]) :: [Type -> Type] where ... Source #
class FieldId (field :: Symbol) a where Source #
Nothing
class GFieldId (field :: Symbol) (a :: Type -> Type) where Source #
Instances
GFieldId field (U1 :: Type -> Type) Source # | |
(GFieldId field f, GFieldId field g) => GFieldId field (f :*: g) Source # | |
(GFieldId field f, GFieldId field g) => GFieldId field (f :+: g) Source # | |
GFieldId field (K1 c f :: Type -> Type) Source # | |
(KnownSymbol field, KnownSymbol field_) => GFieldId field (S1 ('MetaSel ('Just field_) p f b) (Rec0 a)) Source # | |
GFieldId field f => GFieldId field (M1 C t f) Source # | |
GFieldId field f => GFieldId field (M1 D t f) Source # | |
Orphan instances
TensorIndex [Maybe Int] Source # | |
pushIndex :: [RawTensorIndex] -> [Maybe Int] -> [RawTensorIndex] Source # toLens :: TensorLike b => [Maybe Int] -> Lens' Tensor b Source # |