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

Torch.Distributions.Distribution

Synopsis

Documentation

class Distribution a where Source #

logitsToProbs :: Bool -> Tensor -> Tensor Source #

Converts a tensor of logits into probabilities. Note that for the | binary case, each value denotes log odds, whereas for the | multi-dimensional case, the values along the last dimension denote | the log probabilities (possibly unnormalized) of the events.

probsToLogits :: Bool -> Tensor -> Tensor Source #

Converts a tensor of probabilities into logits. For the binary case, | this denotes the probability of occurrence of the event indexed by `1`. | For the multi-dimensional case, the values along the last dimension | denote the probabilities of occurrence of each of the events.

extendedShape :: Distribution a => a -> [Int] -> [Int] Source #

Returns the size of the sample returned by the distribution, given | a sampleShape. Note, that the batch and event shapes of a distribution | instance are fixed at the time of construction. If this is empty, the | returned shape is upcast to (1,). | Args: | sampleShape (torch.Size): the size of the sample to be drawn.