Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Scale
- class Distribution a where
- stddev :: Distribution a => a -> Tensor
- perplexity :: Distribution a => a -> Tensor
- logitsToProbs :: Bool -> Tensor -> Tensor
- clampProbs :: Tensor -> Tensor
- probsToLogits :: Bool -> Tensor -> Tensor
- extendedShape :: Distribution a => a -> [Int] -> [Int]
Documentation
class Distribution a where Source #
batchShape :: a -> [Int] Source #
eventShape :: a -> [Int] Source #
expand :: a -> [Int] -> a Source #
support :: a -> Constraint Source #
variance :: a -> Tensor Source #
sample :: a -> [Int] -> IO Tensor Source #
logProb :: a -> Tensor -> Tensor Source #
entropy :: a -> Tensor Source #
enumerateSupport :: a -> Bool -> Tensor Source #
Instances
Distribution Bernoulli Source # | |
Defined in Torch.Distributions.Bernoulli batchShape :: Bernoulli -> [Int] Source # eventShape :: Bernoulli -> [Int] Source # expand :: Bernoulli -> [Int] -> Bernoulli Source # support :: Bernoulli -> Constraint Source # mean :: Bernoulli -> Tensor Source # variance :: Bernoulli -> Tensor Source # sample :: Bernoulli -> [Int] -> IO Tensor Source # logProb :: Bernoulli -> Tensor -> Tensor Source # | |
Distribution Categorical Source # | |
Defined in Torch.Distributions.Categorical batchShape :: Categorical -> [Int] Source # eventShape :: Categorical -> [Int] Source # expand :: Categorical -> [Int] -> Categorical Source # support :: Categorical -> Constraint Source # mean :: Categorical -> Tensor Source # variance :: Categorical -> Tensor Source # sample :: Categorical -> [Int] -> IO Tensor Source # logProb :: Categorical -> Tensor -> Tensor Source # entropy :: Categorical -> Tensor Source # enumerateSupport :: Categorical -> Bool -> Tensor Source # |
stddev :: Distribution a => a -> Tensor Source #
perplexity :: Distribution a => a -> Tensor 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.
clampProbs :: Tensor -> Tensor Source #
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.