doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
property variance | torch.distributions#torch.distributions.gamma.Gamma.variance |
class torch.distributions.geometric.Geometric(probs=None, logits=None, validate_args=None) [source]
Bases: torch.distributions.distribution.Distribution Creates a Geometric distribution parameterized by probs, where probs is the probability of success of Bernoulli trials. It represents the probability that in k+1k + ... | torch.distributions#torch.distributions.geometric.Geometric |
arg_constraints = {'logits': Real(), 'probs': Interval(lower_bound=0.0, upper_bound=1.0)} | torch.distributions#torch.distributions.geometric.Geometric.arg_constraints |
entropy() [source] | torch.distributions#torch.distributions.geometric.Geometric.entropy |
expand(batch_shape, _instance=None) [source] | torch.distributions#torch.distributions.geometric.Geometric.expand |
logits [source] | torch.distributions#torch.distributions.geometric.Geometric.logits |
log_prob(value) [source] | torch.distributions#torch.distributions.geometric.Geometric.log_prob |
property mean | torch.distributions#torch.distributions.geometric.Geometric.mean |
probs [source] | torch.distributions#torch.distributions.geometric.Geometric.probs |
sample(sample_shape=torch.Size([])) [source] | torch.distributions#torch.distributions.geometric.Geometric.sample |
support = IntegerGreaterThan(lower_bound=0) | torch.distributions#torch.distributions.geometric.Geometric.support |
property variance | torch.distributions#torch.distributions.geometric.Geometric.variance |
class torch.distributions.gumbel.Gumbel(loc, scale, validate_args=None) [source]
Bases: torch.distributions.transformed_distribution.TransformedDistribution Samples from a Gumbel Distribution. Examples: >>> m = Gumbel(torch.tensor([1.0]), torch.tensor([2.0]))
>>> m.sample() # sample from Gumbel distribution with loc... | torch.distributions#torch.distributions.gumbel.Gumbel |
arg_constraints: Dict[str, torch.distributions.constraints.Constraint] = {'loc': Real(), 'scale': GreaterThan(lower_bound=0.0)} | torch.distributions#torch.distributions.gumbel.Gumbel.arg_constraints |
entropy() [source] | torch.distributions#torch.distributions.gumbel.Gumbel.entropy |
expand(batch_shape, _instance=None) [source] | torch.distributions#torch.distributions.gumbel.Gumbel.expand |
log_prob(value) [source] | torch.distributions#torch.distributions.gumbel.Gumbel.log_prob |
property mean | torch.distributions#torch.distributions.gumbel.Gumbel.mean |
property stddev | torch.distributions#torch.distributions.gumbel.Gumbel.stddev |
support = Real() | torch.distributions#torch.distributions.gumbel.Gumbel.support |
property variance | torch.distributions#torch.distributions.gumbel.Gumbel.variance |
class torch.distributions.half_cauchy.HalfCauchy(scale, validate_args=None) [source]
Bases: torch.distributions.transformed_distribution.TransformedDistribution Creates a half-Cauchy distribution parameterized by scale where: X ~ Cauchy(0, scale)
Y = |X| ~ HalfCauchy(scale)
Example: >>> m = HalfCauchy(torch.tensor([... | torch.distributions#torch.distributions.half_cauchy.HalfCauchy |
arg_constraints: Dict[str, torch.distributions.constraints.Constraint] = {'scale': GreaterThan(lower_bound=0.0)} | torch.distributions#torch.distributions.half_cauchy.HalfCauchy.arg_constraints |
cdf(value) [source] | torch.distributions#torch.distributions.half_cauchy.HalfCauchy.cdf |
entropy() [source] | torch.distributions#torch.distributions.half_cauchy.HalfCauchy.entropy |
expand(batch_shape, _instance=None) [source] | torch.distributions#torch.distributions.half_cauchy.HalfCauchy.expand |
has_rsample = True | torch.distributions#torch.distributions.half_cauchy.HalfCauchy.has_rsample |
icdf(prob) [source] | torch.distributions#torch.distributions.half_cauchy.HalfCauchy.icdf |
log_prob(value) [source] | torch.distributions#torch.distributions.half_cauchy.HalfCauchy.log_prob |
property mean | torch.distributions#torch.distributions.half_cauchy.HalfCauchy.mean |
property scale | torch.distributions#torch.distributions.half_cauchy.HalfCauchy.scale |
support = GreaterThan(lower_bound=0.0) | torch.distributions#torch.distributions.half_cauchy.HalfCauchy.support |
property variance | torch.distributions#torch.distributions.half_cauchy.HalfCauchy.variance |
class torch.distributions.half_normal.HalfNormal(scale, validate_args=None) [source]
Bases: torch.distributions.transformed_distribution.TransformedDistribution Creates a half-normal distribution parameterized by scale where: X ~ Normal(0, scale)
Y = |X| ~ HalfNormal(scale)
Example: >>> m = HalfNormal(torch.tensor([... | torch.distributions#torch.distributions.half_normal.HalfNormal |
arg_constraints: Dict[str, torch.distributions.constraints.Constraint] = {'scale': GreaterThan(lower_bound=0.0)} | torch.distributions#torch.distributions.half_normal.HalfNormal.arg_constraints |
cdf(value) [source] | torch.distributions#torch.distributions.half_normal.HalfNormal.cdf |
entropy() [source] | torch.distributions#torch.distributions.half_normal.HalfNormal.entropy |
expand(batch_shape, _instance=None) [source] | torch.distributions#torch.distributions.half_normal.HalfNormal.expand |
has_rsample = True | torch.distributions#torch.distributions.half_normal.HalfNormal.has_rsample |
icdf(prob) [source] | torch.distributions#torch.distributions.half_normal.HalfNormal.icdf |
log_prob(value) [source] | torch.distributions#torch.distributions.half_normal.HalfNormal.log_prob |
property mean | torch.distributions#torch.distributions.half_normal.HalfNormal.mean |
property scale | torch.distributions#torch.distributions.half_normal.HalfNormal.scale |
support = GreaterThan(lower_bound=0.0) | torch.distributions#torch.distributions.half_normal.HalfNormal.support |
property variance | torch.distributions#torch.distributions.half_normal.HalfNormal.variance |
class torch.distributions.independent.Independent(base_distribution, reinterpreted_batch_ndims, validate_args=None) [source]
Bases: torch.distributions.distribution.Distribution Reinterprets some of the batch dims of a distribution as event dims. This is mainly useful for changing the shape of the result of log_prob(... | torch.distributions#torch.distributions.independent.Independent |
arg_constraints: Dict[str, torch.distributions.constraints.Constraint] = {} | torch.distributions#torch.distributions.independent.Independent.arg_constraints |
entropy() [source] | torch.distributions#torch.distributions.independent.Independent.entropy |
enumerate_support(expand=True) [source] | torch.distributions#torch.distributions.independent.Independent.enumerate_support |
expand(batch_shape, _instance=None) [source] | torch.distributions#torch.distributions.independent.Independent.expand |
property has_enumerate_support | torch.distributions#torch.distributions.independent.Independent.has_enumerate_support |
property has_rsample | torch.distributions#torch.distributions.independent.Independent.has_rsample |
log_prob(value) [source] | torch.distributions#torch.distributions.independent.Independent.log_prob |
property mean | torch.distributions#torch.distributions.independent.Independent.mean |
rsample(sample_shape=torch.Size([])) [source] | torch.distributions#torch.distributions.independent.Independent.rsample |
sample(sample_shape=torch.Size([])) [source] | torch.distributions#torch.distributions.independent.Independent.sample |
property support | torch.distributions#torch.distributions.independent.Independent.support |
property variance | torch.distributions#torch.distributions.independent.Independent.variance |
torch.distributions.kl.kl_divergence(p, q) [source]
Compute Kullback-Leibler divergence KL(p∥q)KL(p \| q) between two distributions. KL(p∥q)=∫p(x)logp(x)q(x)dxKL(p \| q) = \int p(x) \log\frac {p(x)} {q(x)} \,dx
Parameters
p (Distribution) – A Distribution object.
q (Distribution) – A Distribution object. R... | torch.distributions#torch.distributions.kl.kl_divergence |
torch.distributions.kl.register_kl(type_p, type_q) [source]
Decorator to register a pairwise function with kl_divergence(). Usage: @register_kl(Normal, Normal)
def kl_normal_normal(p, q):
# insert implementation here
Lookup returns the most specific (type,type) match ordered by subclass. If the match is ambiguou... | torch.distributions#torch.distributions.kl.register_kl |
class torch.distributions.kumaraswamy.Kumaraswamy(concentration1, concentration0, validate_args=None) [source]
Bases: torch.distributions.transformed_distribution.TransformedDistribution Samples from a Kumaraswamy distribution. Example: >>> m = Kumaraswamy(torch.Tensor([1.0]), torch.Tensor([1.0]))
>>> m.sample() # s... | torch.distributions#torch.distributions.kumaraswamy.Kumaraswamy |
arg_constraints: Dict[str, torch.distributions.constraints.Constraint] = {'concentration0': GreaterThan(lower_bound=0.0), 'concentration1': GreaterThan(lower_bound=0.0)} | torch.distributions#torch.distributions.kumaraswamy.Kumaraswamy.arg_constraints |
entropy() [source] | torch.distributions#torch.distributions.kumaraswamy.Kumaraswamy.entropy |
expand(batch_shape, _instance=None) [source] | torch.distributions#torch.distributions.kumaraswamy.Kumaraswamy.expand |
has_rsample = True | torch.distributions#torch.distributions.kumaraswamy.Kumaraswamy.has_rsample |
property mean | torch.distributions#torch.distributions.kumaraswamy.Kumaraswamy.mean |
support = Interval(lower_bound=0.0, upper_bound=1.0) | torch.distributions#torch.distributions.kumaraswamy.Kumaraswamy.support |
property variance | torch.distributions#torch.distributions.kumaraswamy.Kumaraswamy.variance |
class torch.distributions.laplace.Laplace(loc, scale, validate_args=None) [source]
Bases: torch.distributions.distribution.Distribution Creates a Laplace distribution parameterized by loc and scale. Example: >>> m = Laplace(torch.tensor([0.0]), torch.tensor([1.0]))
>>> m.sample() # Laplace distributed with loc=0, sc... | torch.distributions#torch.distributions.laplace.Laplace |
arg_constraints = {'loc': Real(), 'scale': GreaterThan(lower_bound=0.0)} | torch.distributions#torch.distributions.laplace.Laplace.arg_constraints |
cdf(value) [source] | torch.distributions#torch.distributions.laplace.Laplace.cdf |
entropy() [source] | torch.distributions#torch.distributions.laplace.Laplace.entropy |
expand(batch_shape, _instance=None) [source] | torch.distributions#torch.distributions.laplace.Laplace.expand |
has_rsample = True | torch.distributions#torch.distributions.laplace.Laplace.has_rsample |
icdf(value) [source] | torch.distributions#torch.distributions.laplace.Laplace.icdf |
log_prob(value) [source] | torch.distributions#torch.distributions.laplace.Laplace.log_prob |
property mean | torch.distributions#torch.distributions.laplace.Laplace.mean |
rsample(sample_shape=torch.Size([])) [source] | torch.distributions#torch.distributions.laplace.Laplace.rsample |
property stddev | torch.distributions#torch.distributions.laplace.Laplace.stddev |
support = Real() | torch.distributions#torch.distributions.laplace.Laplace.support |
property variance | torch.distributions#torch.distributions.laplace.Laplace.variance |
class torch.distributions.lkj_cholesky.LKJCholesky(dim, concentration=1.0, validate_args=None) [source]
Bases: torch.distributions.distribution.Distribution LKJ distribution for lower Cholesky factor of correlation matrices. The distribution is controlled by concentration parameter η\eta to make the probability of t... | torch.distributions#torch.distributions.lkj_cholesky.LKJCholesky |
arg_constraints = {'concentration': GreaterThan(lower_bound=0.0)} | torch.distributions#torch.distributions.lkj_cholesky.LKJCholesky.arg_constraints |
expand(batch_shape, _instance=None) [source] | torch.distributions#torch.distributions.lkj_cholesky.LKJCholesky.expand |
log_prob(value) [source] | torch.distributions#torch.distributions.lkj_cholesky.LKJCholesky.log_prob |
sample(sample_shape=torch.Size([])) [source] | torch.distributions#torch.distributions.lkj_cholesky.LKJCholesky.sample |
support = CorrCholesky() | torch.distributions#torch.distributions.lkj_cholesky.LKJCholesky.support |
class torch.distributions.log_normal.LogNormal(loc, scale, validate_args=None) [source]
Bases: torch.distributions.transformed_distribution.TransformedDistribution Creates a log-normal distribution parameterized by loc and scale where: X ~ Normal(loc, scale)
Y = exp(X) ~ LogNormal(loc, scale)
Example: >>> m = LogNor... | torch.distributions#torch.distributions.log_normal.LogNormal |
arg_constraints: Dict[str, torch.distributions.constraints.Constraint] = {'loc': Real(), 'scale': GreaterThan(lower_bound=0.0)} | torch.distributions#torch.distributions.log_normal.LogNormal.arg_constraints |
entropy() [source] | torch.distributions#torch.distributions.log_normal.LogNormal.entropy |
expand(batch_shape, _instance=None) [source] | torch.distributions#torch.distributions.log_normal.LogNormal.expand |
has_rsample = True | torch.distributions#torch.distributions.log_normal.LogNormal.has_rsample |
property loc | torch.distributions#torch.distributions.log_normal.LogNormal.loc |
property mean | torch.distributions#torch.distributions.log_normal.LogNormal.mean |
property scale | torch.distributions#torch.distributions.log_normal.LogNormal.scale |
support = GreaterThan(lower_bound=0.0) | torch.distributions#torch.distributions.log_normal.LogNormal.support |
property variance | torch.distributions#torch.distributions.log_normal.LogNormal.variance |
class torch.distributions.lowrank_multivariate_normal.LowRankMultivariateNormal(loc, cov_factor, cov_diag, validate_args=None) [source]
Bases: torch.distributions.distribution.Distribution Creates a multivariate normal distribution with covariance matrix having a low-rank form parameterized by cov_factor and cov_diag... | torch.distributions#torch.distributions.lowrank_multivariate_normal.LowRankMultivariateNormal |
arg_constraints = {'cov_diag': IndependentConstraint(GreaterThan(lower_bound=0.0), 1), 'cov_factor': IndependentConstraint(Real(), 2), 'loc': IndependentConstraint(Real(), 1)} | torch.distributions#torch.distributions.lowrank_multivariate_normal.LowRankMultivariateNormal.arg_constraints |
covariance_matrix [source] | torch.distributions#torch.distributions.lowrank_multivariate_normal.LowRankMultivariateNormal.covariance_matrix |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.