Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data RequiresGradient
- type family WithGradientSym0 :: RequiresGradient where ...
- type family WithoutGradientSym0 :: RequiresGradient where ...
- data SRequiresGradient :: RequiresGradient -> Type where
- class KnownRequiresGradient (requiresGradient :: RequiresGradient) where
- data Gradient (requiresGradient :: Type) where
- UncheckedGradient :: forall requiresGradient. Gradient requiresGradient
- Gradient :: forall requiresGradient. requiresGradient -> Gradient requiresGradient
- data SGradient (gradient :: Gradient RequiresGradient) where
- SUncheckedGradient :: RequiresGradient -> SGradient 'UncheckedGradient
- SGradient :: forall requiresGradient. SRequiresGradient requiresGradient -> SGradient ('Gradient requiresGradient)
- class KnownGradient (gradient :: Gradient RequiresGradient) where
- type family GetGradients f where ...
Documentation
data RequiresGradient Source #
Data type to represent whether or not the tensor requires gradient computations.
WithGradient | The tensor requires gradient computations. |
WithoutGradient | Gradient computations for this tensor are disabled. |
Instances
type family WithGradientSym0 :: RequiresGradient where ... Source #
type family WithoutGradientSym0 :: RequiresGradient where ... Source #
data SRequiresGradient :: RequiresGradient -> Type where Source #
SWithGradient :: SRequiresGradient ('WithGradient :: RequiresGradient) | |
SWithoutGradient :: SRequiresGradient ('WithoutGradient :: RequiresGradient) |
Instances
Show (SRequiresGradient requiresGradient) Source # | |
Defined in Torch.GraduallyTyped.RequiresGradient |
class KnownRequiresGradient (requiresGradient :: RequiresGradient) where Source #
data Gradient (requiresGradient :: Type) where Source #
Data type to represent whether or not it is known by the compiler if the tensor requires gradient computations.
UncheckedGradient :: forall requiresGradient. Gradient requiresGradient | Whether or not the tensor requires gradient computations is unknown to the compiler. |
Gradient :: forall requiresGradient. requiresGradient -> Gradient requiresGradient | Whether or not the tensor requires gradient computations is known to the compiler. |
Instances
Show requiresGradient => Show (Gradient requiresGradient) Source # | |
SingKind (Gradient RequiresGradient) Source # | |
Defined in Torch.GraduallyTyped.RequiresGradient fromSing :: forall (a :: Gradient RequiresGradient). Sing a -> Demote (Gradient RequiresGradient) Source # toSing :: Demote (Gradient RequiresGradient) -> SomeSing (Gradient RequiresGradient) Source # | |
SingI requiresGradient => SingI ('Gradient requiresGradient :: Gradient RequiresGradient) Source # | |
type Demote (Gradient RequiresGradient) Source # | |
Defined in Torch.GraduallyTyped.RequiresGradient | |
type Sing Source # | |
Defined in Torch.GraduallyTyped.RequiresGradient |
data SGradient (gradient :: Gradient RequiresGradient) where Source #
SUncheckedGradient :: RequiresGradient -> SGradient 'UncheckedGradient | |
SGradient :: forall requiresGradient. SRequiresGradient requiresGradient -> SGradient ('Gradient requiresGradient) |
class KnownGradient (gradient :: Gradient RequiresGradient) where Source #
Instances
KnownGradient ('UncheckedGradient :: Gradient RequiresGradient) Source # | |
KnownRequiresGradient requiresGradient => KnownGradient ('Gradient requiresGradient) Source # | |
type family GetGradients f where ... Source #
GetGradients (a :: Gradient RequiresGradient) = '[a] | |
GetGradients (f g) = Concat (GetGradients f) (GetGradients g) | |
GetGradients _ = '[] |