Update generated Python Op docs.
Change: 126215364
diff --git a/tensorflow/g3doc/api_docs/python/contrib.distributions.md b/tensorflow/g3doc/api_docs/python/contrib.distributions.md
index 08ef43a..5ce7291 100644
--- a/tensorflow/g3doc/api_docs/python/contrib.distributions.md
+++ b/tensorflow/g3doc/api_docs/python/contrib.distributions.md
@@ -110,11 +110,11 @@
b = tf.exp(tf.matmul(logits, weights_b))
# Will raise exception if ANY batch member has a < 1 or b < 1.
-dist = distributions.beta(a, b, allow_nan=False) # default is False
+dist = distributions.beta(a, b, strict_statistics=True) # default is True
mode = dist.mode().eval()
# Will return NaN for batch members with either a < 1 or b < 1.
-dist = distributions.beta(a, b, allow_nan=True)
+dist = distributions.beta(a, b, strict_statistics=False)
mode = dist.mode().eval()
```
@@ -123,7 +123,7 @@
```python
# Will raise an exception if any Op is run.
negative_a = -1.0 * a # beta distribution by definition has a > 0.
-dist = distributions.beta(negative_a, b, allow_nan=True)
+dist = distributions.beta(negative_a, b, strict_statistics=False)
dist.mean().eval()
```
- - -
@@ -264,6 +264,13 @@
- - -
+#### `tf.contrib.distributions.BaseDistribution.strict_statistics` {#BaseDistribution.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.BaseDistribution.variance(name='variance')` {#BaseDistribution.variance}
Variance of the distribution.
@@ -457,6 +464,13 @@
- - -
+#### `tf.contrib.distributions.ContinuousDistribution.strict_statistics` {#ContinuousDistribution.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.ContinuousDistribution.variance(name='variance')` {#ContinuousDistribution.variance}
Variance of the distribution.
@@ -636,6 +650,13 @@
- - -
+#### `tf.contrib.distributions.DiscreteDistribution.strict_statistics` {#DiscreteDistribution.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.DiscreteDistribution.variance(name='variance')` {#DiscreteDistribution.variance}
Variance of the distribution.
@@ -659,7 +680,7 @@
* log_cdf
- - -
-#### `tf.contrib.distributions.Bernoulli.__init__(p, dtype=tf.int32, strict=True, name='Bernoulli')` {#Bernoulli.__init__}
+#### `tf.contrib.distributions.Bernoulli.__init__(p, dtype=tf.int32, strict=True, strict_statistics=True, name='Bernoulli')` {#Bernoulli.__init__}
Construct Bernoulli distributions.
@@ -672,6 +693,10 @@
* <b>`dtype`</b>: dtype for samples. Note that other values will take the dtype of p.
* <b>`strict`</b>: Whether to assert that `0 <= p <= 1`. If not strict, `log_pmf` may
return nans.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: A name for this distribution.
@@ -892,6 +917,13 @@
- - -
+#### `tf.contrib.distributions.Bernoulli.strict_statistics` {#Bernoulli.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Bernoulli.variance(name='variance')` {#Bernoulli.variance}
Variance of the distribution.
@@ -923,7 +955,7 @@
* log_cdf
- - -
-#### `tf.contrib.distributions.Categorical.__init__(logits, dtype=tf.int32, strict=True, name='Categorical')` {#Categorical.__init__}
+#### `tf.contrib.distributions.Categorical.__init__(logits, dtype=tf.int32, strict=True, strict_statistics=True, name='Categorical')` {#Categorical.__init__}
Initialize Categorical distributions using class log-probabilities.
@@ -936,6 +968,10 @@
indexes into the classes.
* <b>`dtype`</b>: The type of the event samples (default: int32).
* <b>`strict`</b>: Unused in this distribution.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: A name for this distribution (optional).
@@ -1112,6 +1148,13 @@
- - -
+#### `tf.contrib.distributions.Categorical.strict_statistics` {#Categorical.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Categorical.variance(name='variance')` {#Categorical.variance}
Variance of the distribution.
@@ -1132,7 +1175,7 @@
with Chi2(df) = Gamma(df/2, 1/2).
- - -
-#### `tf.contrib.distributions.Chi2.__init__(df, strict=True, name='Chi2')` {#Chi2.__init__}
+#### `tf.contrib.distributions.Chi2.__init__(df, strict=True, strict_statistics=True, name='Chi2')` {#Chi2.__init__}
Construct Chi2 distributions with parameter `df`.
@@ -1144,6 +1187,10 @@
* <b>`strict`</b>: Whether to assert that `df > 0`, and that `x > 0` in the
methods `pdf(x)` and `log_pdf(x)`. If `strict` is False
and the inputs are invalid, correct behavior is not guaranteed.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to prepend to all ops created by this distribution.
@@ -1346,7 +1393,20 @@
#### `tf.contrib.distributions.Chi2.mode(name='mode')` {#Chi2.mode}
-Mode of each batch member. Defined only if alpha >= 1.
+Mode of each batch member.
+
+The mode of a gamma distribution is `(alpha - 1) / beta` when `alpha > 1`,
+and `NaN` otherwise. If `self.strict_statistics` is `True`, an exception
+will be raised rather than returning `NaN`.
+
+##### Args:
+
+
+* <b>`name`</b>: A name to give this op.
+
+##### Returns:
+
+ The mode for every batch member, a `Tensor` with same `dtype` as self.
- - -
@@ -1418,6 +1478,13 @@
- - -
+#### `tf.contrib.distributions.Chi2.strict_statistics` {#Chi2.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Chi2.variance(name='variance')` {#Chi2.variance}
Variance of each batch member.
@@ -1438,7 +1505,7 @@
distribution, with Exponential(lam) = Gamma(1, lam).
- - -
-#### `tf.contrib.distributions.Exponential.__init__(lam, strict=True, name='Exponential')` {#Exponential.__init__}
+#### `tf.contrib.distributions.Exponential.__init__(lam, strict=True, strict_statistics=True, name='Exponential')` {#Exponential.__init__}
Construct Exponential distribution with parameter `lam`.
@@ -1450,6 +1517,10 @@
* <b>`strict`</b>: Whether to assert that `lam > 0`, and that `x > 0` in the
methods `pdf(x)` and `log_pdf(x)`. If `strict` is False
and the inputs are invalid, correct behavior is not guaranteed.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to prepend to all ops created by this distribution.
@@ -1652,7 +1723,20 @@
#### `tf.contrib.distributions.Exponential.mode(name='mode')` {#Exponential.mode}
-Mode of each batch member. Defined only if alpha >= 1.
+Mode of each batch member.
+
+The mode of a gamma distribution is `(alpha - 1) / beta` when `alpha > 1`,
+and `NaN` otherwise. If `self.strict_statistics` is `True`, an exception
+will be raised rather than returning `NaN`.
+
+##### Args:
+
+
+* <b>`name`</b>: A name to give this op.
+
+##### Returns:
+
+ The mode for every batch member, a `Tensor` with same `dtype` as self.
- - -
@@ -1721,6 +1805,13 @@
- - -
+#### `tf.contrib.distributions.Exponential.strict_statistics` {#Exponential.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Exponential.variance(name='variance')` {#Exponential.variance}
Variance of each batch member.
@@ -1753,7 +1844,7 @@
```
- - -
-#### `tf.contrib.distributions.Gamma.__init__(alpha, beta, strict=True, name='Gamma')` {#Gamma.__init__}
+#### `tf.contrib.distributions.Gamma.__init__(alpha, beta, strict=True, strict_statistics=True, name='Gamma')` {#Gamma.__init__}
Construct Gamma distributions with parameters `alpha` and `beta`.
@@ -1772,6 +1863,10 @@
* <b>`strict`</b>: Whether to assert that `a > 0, b > 0`, and that `x > 0` in the
methods `pdf(x)` and `log_pdf(x)`. If `strict` is False
and the inputs are invalid, correct behavior is not guaranteed.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to prepend to all ops created by this distribution.
##### Raises:
@@ -1972,7 +2067,20 @@
#### `tf.contrib.distributions.Gamma.mode(name='mode')` {#Gamma.mode}
-Mode of each batch member. Defined only if alpha >= 1.
+Mode of each batch member.
+
+The mode of a gamma distribution is `(alpha - 1) / beta` when `alpha > 1`,
+and `NaN` otherwise. If `self.strict_statistics` is `True`, an exception
+will be raised rather than returning `NaN`.
+
+##### Args:
+
+
+* <b>`name`</b>: A name to give this op.
+
+##### Returns:
+
+ The mode for every batch member, a `Tensor` with same `dtype` as self.
- - -
@@ -2044,6 +2152,13 @@
- - -
+#### `tf.contrib.distributions.Gamma.strict_statistics` {#Gamma.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Gamma.variance(name='variance')` {#Gamma.variance}
Variance of each batch member.
@@ -2098,7 +2213,7 @@
```
- - -
-#### `tf.contrib.distributions.Normal.__init__(mu, sigma, strict=True, name='Normal')` {#Normal.__init__}
+#### `tf.contrib.distributions.Normal.__init__(mu, sigma, strict=True, strict_statistics=True, name='Normal')` {#Normal.__init__}
Construct Normal distributions with mean and stddev `mu` and `sigma`.
@@ -2113,6 +2228,10 @@
sigma must contain only positive values.
* <b>`strict`</b>: Whether to assert that `sigma > 0`. If `strict` is False,
correct output is not guaranteed when input is invalid.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to give Ops created by the initializer.
##### Raises:
@@ -2363,6 +2482,13 @@
- - -
+#### `tf.contrib.distributions.Normal.strict_statistics` {#Normal.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Normal.variance(name='variance')` {#Normal.variance}
Variance of this distribution.
@@ -2420,7 +2546,7 @@
```
- - -
-#### `tf.contrib.distributions.StudentT.__init__(df, mu, sigma, strict=True, name='StudentT')` {#StudentT.__init__}
+#### `tf.contrib.distributions.StudentT.__init__(df, mu, sigma, strict=True, strict_statistics=True, name='StudentT')` {#StudentT.__init__}
Construct Student's t distributions.
@@ -2440,6 +2566,10 @@
Note that `sigma` is not the standard deviation of this distribution.
* <b>`strict`</b>: Whether to assert that `df > 0, sigma > 0`. If `strict` is False
and inputs are invalid, correct behavior is not guaranteed.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to give Ops created by the initializer.
##### Raises:
@@ -2557,7 +2687,20 @@
#### `tf.contrib.distributions.StudentT.mean(name='mean')` {#StudentT.mean}
+Mean of the distribution.
+The mean of Student's T equals `mu` if `df > 1`, otherwise it is `NaN`. If
+`self.strict_statistics=True`, then an exception will be raised rather than
+returning `NaN`.
+
+##### Args:
+
+
+* <b>`name`</b>: A name to give this op.
+
+##### Returns:
+
+ The mean for every batch member, a `Tensor` with same `dtype` as self.
- - -
@@ -2643,9 +2786,37 @@
- - -
+#### `tf.contrib.distributions.StudentT.strict_statistics` {#StudentT.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.StudentT.variance(name='variance')` {#StudentT.variance}
+Variance of the distribution.
+Variance for Student's T equals
+
+```
+df / (df - 2), when df > 2
+infinity, when 1 < df <= 2
+NaN, when df <= 1
+```
+
+The NaN state occurs because mean is undefined for `df <= 1`, and if
+`self.strict_statistics` is `True`, an exception will be raised if any batch
+members fall into this state.
+
+##### Args:
+
+
+* <b>`name`</b>: A name for this op.
+
+##### Returns:
+
+ The variance for every batch member, a `Tensor` with same `dtype` as self.
@@ -2658,7 +2829,7 @@
The PDF of this distribution is constant between [`a`, `b`], and 0 elsewhere.
- - -
-#### `tf.contrib.distributions.Uniform.__init__(a=0.0, b=1.0, strict=True, name='Uniform')` {#Uniform.__init__}
+#### `tf.contrib.distributions.Uniform.__init__(a=0.0, b=1.0, strict=True, strict_statistics=True, name='Uniform')` {#Uniform.__init__}
Construct Uniform distributions with `a` and `b`.
@@ -2690,6 +2861,10 @@
* <b>`b`</b>: `float` or `double` tensor, the maximum endpoint. Must be > `a`.
* <b>`strict`</b>: Whether to assert that `a > b`. If `strict` is False and inputs
are invalid, correct behavior is not guaranteed.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to prefix Ops created by this distribution class.
##### Raises:
@@ -2894,6 +3069,13 @@
- - -
+#### `tf.contrib.distributions.Uniform.strict_statistics` {#Uniform.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Uniform.variance(name='variance')` {#Uniform.variance}
@@ -3199,7 +3381,7 @@
```
- - -
-#### `tf.contrib.distributions.DirichletMultinomial.__init__(n, alpha, allow_arbitrary_counts=False, allow_nan=False, strict=True, name='DirichletMultinomial')` {#DirichletMultinomial.__init__}
+#### `tf.contrib.distributions.DirichletMultinomial.__init__(n, alpha, allow_arbitrary_counts=False, strict=True, strict_statistics=True, name='DirichletMultinomial')` {#DirichletMultinomial.__init__}
Initialize a batch of DirichletMultinomial distributions.
@@ -3218,13 +3400,13 @@
The pmf/cdf are functions that can be evaluated at non-integral values,
but are only a distribution over non-negative integers. If `strict` is
`False`, this assertion is turned off.
-* <b>`allow_nan`</b>: Boolean, default False. If False, raise an exception if
- a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
- If True, batch members with valid parameters leading to undefined
- statistics will return NaN for this statistic.
* <b>`strict`</b>: Whether to assert valid values for parameters `alpha` and `n`, and
`x` in `pmf` and `log_pmf`. If False, correct behavior is not
guaranteed.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to prefix Ops created by this distribution class.
@@ -3242,13 +3424,6 @@
- - -
-#### `tf.contrib.distributions.DirichletMultinomial.allow_nan` {#DirichletMultinomial.allow_nan}
-
-Boolean describing behavior when a stat is undefined for batch member.
-
-
-- - -
-
#### `tf.contrib.distributions.DirichletMultinomial.alpha` {#DirichletMultinomial.alpha}
Parameter defining this distribution.
@@ -3470,6 +3645,13 @@
- - -
+#### `tf.contrib.distributions.DirichletMultinomial.strict_statistics` {#DirichletMultinomial.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.DirichletMultinomial.variance(name='variance')` {#DirichletMultinomial.variance}
Variance of the distribution.
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.Bernoulli.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.Bernoulli.md
index 2eba69a..0c8bb37 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.Bernoulli.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.Bernoulli.md
@@ -8,7 +8,7 @@
* log_cdf
- - -
-#### `tf.contrib.distributions.Bernoulli.__init__(p, dtype=tf.int32, strict=True, name='Bernoulli')` {#Bernoulli.__init__}
+#### `tf.contrib.distributions.Bernoulli.__init__(p, dtype=tf.int32, strict=True, strict_statistics=True, name='Bernoulli')` {#Bernoulli.__init__}
Construct Bernoulli distributions.
@@ -21,6 +21,10 @@
* <b>`dtype`</b>: dtype for samples. Note that other values will take the dtype of p.
* <b>`strict`</b>: Whether to assert that `0 <= p <= 1`. If not strict, `log_pmf` may
return nans.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: A name for this distribution.
@@ -241,6 +245,13 @@
- - -
+#### `tf.contrib.distributions.Bernoulli.strict_statistics` {#Bernoulli.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Bernoulli.variance(name='variance')` {#Bernoulli.variance}
Variance of the distribution.
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.contrib.distributions.StudentT.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.contrib.distributions.StudentT.md
index 796b095..5162156 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.contrib.distributions.StudentT.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.contrib.distributions.StudentT.md
@@ -45,7 +45,7 @@
```
- - -
-#### `tf.contrib.distributions.StudentT.__init__(df, mu, sigma, strict=True, name='StudentT')` {#StudentT.__init__}
+#### `tf.contrib.distributions.StudentT.__init__(df, mu, sigma, strict=True, strict_statistics=True, name='StudentT')` {#StudentT.__init__}
Construct Student's t distributions.
@@ -65,6 +65,10 @@
Note that `sigma` is not the standard deviation of this distribution.
* <b>`strict`</b>: Whether to assert that `df > 0, sigma > 0`. If `strict` is False
and inputs are invalid, correct behavior is not guaranteed.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to give Ops created by the initializer.
##### Raises:
@@ -182,7 +186,20 @@
#### `tf.contrib.distributions.StudentT.mean(name='mean')` {#StudentT.mean}
+Mean of the distribution.
+The mean of Student's T equals `mu` if `df > 1`, otherwise it is `NaN`. If
+`self.strict_statistics=True`, then an exception will be raised rather than
+returning `NaN`.
+
+##### Args:
+
+
+* <b>`name`</b>: A name to give this op.
+
+##### Returns:
+
+ The mean for every batch member, a `Tensor` with same `dtype` as self.
- - -
@@ -268,8 +285,36 @@
- - -
+#### `tf.contrib.distributions.StudentT.strict_statistics` {#StudentT.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.StudentT.variance(name='variance')` {#StudentT.variance}
+Variance of the distribution.
+Variance for Student's T equals
+
+```
+df / (df - 2), when df > 2
+infinity, when 1 < df <= 2
+NaN, when df <= 1
+```
+
+The NaN state occurs because mean is undefined for `df <= 1`, and if
+`self.strict_statistics` is `True`, an exception will be raised if any batch
+members fall into this state.
+
+##### Args:
+
+
+* <b>`name`</b>: A name for this op.
+
+##### Returns:
+
+ The variance for every batch member, a `Tensor` with same `dtype` as self.
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.contrib.distributions.Categorical.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.contrib.distributions.Categorical.md
index 8f4fad2..dbfd052 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.contrib.distributions.Categorical.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.contrib.distributions.Categorical.md
@@ -9,7 +9,7 @@
* log_cdf
- - -
-#### `tf.contrib.distributions.Categorical.__init__(logits, dtype=tf.int32, strict=True, name='Categorical')` {#Categorical.__init__}
+#### `tf.contrib.distributions.Categorical.__init__(logits, dtype=tf.int32, strict=True, strict_statistics=True, name='Categorical')` {#Categorical.__init__}
Initialize Categorical distributions using class log-probabilities.
@@ -22,6 +22,10 @@
indexes into the classes.
* <b>`dtype`</b>: The type of the event samples (default: int32).
* <b>`strict`</b>: Unused in this distribution.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: A name for this distribution (optional).
@@ -198,6 +202,13 @@
- - -
+#### `tf.contrib.distributions.Categorical.strict_statistics` {#Categorical.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Categorical.variance(name='variance')` {#Categorical.variance}
Variance of the distribution.
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.contrib.distributions.Chi2.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.contrib.distributions.Chi2.md
index 9dc4439..6ab36d4 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.contrib.distributions.Chi2.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.contrib.distributions.Chi2.md
@@ -8,7 +8,7 @@
with Chi2(df) = Gamma(df/2, 1/2).
- - -
-#### `tf.contrib.distributions.Chi2.__init__(df, strict=True, name='Chi2')` {#Chi2.__init__}
+#### `tf.contrib.distributions.Chi2.__init__(df, strict=True, strict_statistics=True, name='Chi2')` {#Chi2.__init__}
Construct Chi2 distributions with parameter `df`.
@@ -20,6 +20,10 @@
* <b>`strict`</b>: Whether to assert that `df > 0`, and that `x > 0` in the
methods `pdf(x)` and `log_pdf(x)`. If `strict` is False
and the inputs are invalid, correct behavior is not guaranteed.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to prepend to all ops created by this distribution.
@@ -222,7 +226,20 @@
#### `tf.contrib.distributions.Chi2.mode(name='mode')` {#Chi2.mode}
-Mode of each batch member. Defined only if alpha >= 1.
+Mode of each batch member.
+
+The mode of a gamma distribution is `(alpha - 1) / beta` when `alpha > 1`,
+and `NaN` otherwise. If `self.strict_statistics` is `True`, an exception
+will be raised rather than returning `NaN`.
+
+##### Args:
+
+
+* <b>`name`</b>: A name to give this op.
+
+##### Returns:
+
+ The mode for every batch member, a `Tensor` with same `dtype` as self.
- - -
@@ -294,6 +311,13 @@
- - -
+#### `tf.contrib.distributions.Chi2.strict_statistics` {#Chi2.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Chi2.variance(name='variance')` {#Chi2.variance}
Variance of each batch member.
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.contrib.distributions.Uniform.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.contrib.distributions.Uniform.md
index 23244e5..cdfdeb0 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.contrib.distributions.Uniform.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.contrib.distributions.Uniform.md
@@ -3,7 +3,7 @@
The PDF of this distribution is constant between [`a`, `b`], and 0 elsewhere.
- - -
-#### `tf.contrib.distributions.Uniform.__init__(a=0.0, b=1.0, strict=True, name='Uniform')` {#Uniform.__init__}
+#### `tf.contrib.distributions.Uniform.__init__(a=0.0, b=1.0, strict=True, strict_statistics=True, name='Uniform')` {#Uniform.__init__}
Construct Uniform distributions with `a` and `b`.
@@ -35,6 +35,10 @@
* <b>`b`</b>: `float` or `double` tensor, the maximum endpoint. Must be > `a`.
* <b>`strict`</b>: Whether to assert that `a > b`. If `strict` is False and inputs
are invalid, correct behavior is not guaranteed.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to prefix Ops created by this distribution class.
##### Raises:
@@ -239,6 +243,13 @@
- - -
+#### `tf.contrib.distributions.Uniform.strict_statistics` {#Uniform.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Uniform.variance(name='variance')` {#Uniform.variance}
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.ContinuousDistribution.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.ContinuousDistribution.md
index 2731341..2ffdd61 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.ContinuousDistribution.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.ContinuousDistribution.md
@@ -181,6 +181,13 @@
- - -
+#### `tf.contrib.distributions.ContinuousDistribution.strict_statistics` {#ContinuousDistribution.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.ContinuousDistribution.variance(name='variance')` {#ContinuousDistribution.variance}
Variance of the distribution.
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.DirichletMultinomial.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.DirichletMultinomial.md
index 9585ebc..6c496a0 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.DirichletMultinomial.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.DirichletMultinomial.md
@@ -67,7 +67,7 @@
```
- - -
-#### `tf.contrib.distributions.DirichletMultinomial.__init__(n, alpha, allow_arbitrary_counts=False, allow_nan=False, strict=True, name='DirichletMultinomial')` {#DirichletMultinomial.__init__}
+#### `tf.contrib.distributions.DirichletMultinomial.__init__(n, alpha, allow_arbitrary_counts=False, strict=True, strict_statistics=True, name='DirichletMultinomial')` {#DirichletMultinomial.__init__}
Initialize a batch of DirichletMultinomial distributions.
@@ -86,13 +86,13 @@
The pmf/cdf are functions that can be evaluated at non-integral values,
but are only a distribution over non-negative integers. If `strict` is
`False`, this assertion is turned off.
-* <b>`allow_nan`</b>: Boolean, default False. If False, raise an exception if
- a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
- If True, batch members with valid parameters leading to undefined
- statistics will return NaN for this statistic.
* <b>`strict`</b>: Whether to assert valid values for parameters `alpha` and `n`, and
`x` in `pmf` and `log_pmf`. If False, correct behavior is not
guaranteed.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to prefix Ops created by this distribution class.
@@ -110,13 +110,6 @@
- - -
-#### `tf.contrib.distributions.DirichletMultinomial.allow_nan` {#DirichletMultinomial.allow_nan}
-
-Boolean describing behavior when a stat is undefined for batch member.
-
-
-- - -
-
#### `tf.contrib.distributions.DirichletMultinomial.alpha` {#DirichletMultinomial.alpha}
Parameter defining this distribution.
@@ -338,6 +331,13 @@
- - -
+#### `tf.contrib.distributions.DirichletMultinomial.strict_statistics` {#DirichletMultinomial.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.DirichletMultinomial.variance(name='variance')` {#DirichletMultinomial.variance}
Variance of the distribution.
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.Exponential.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.Exponential.md
index 771195f..4e64ae1 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.Exponential.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.Exponential.md
@@ -8,7 +8,7 @@
distribution, with Exponential(lam) = Gamma(1, lam).
- - -
-#### `tf.contrib.distributions.Exponential.__init__(lam, strict=True, name='Exponential')` {#Exponential.__init__}
+#### `tf.contrib.distributions.Exponential.__init__(lam, strict=True, strict_statistics=True, name='Exponential')` {#Exponential.__init__}
Construct Exponential distribution with parameter `lam`.
@@ -20,6 +20,10 @@
* <b>`strict`</b>: Whether to assert that `lam > 0`, and that `x > 0` in the
methods `pdf(x)` and `log_pdf(x)`. If `strict` is False
and the inputs are invalid, correct behavior is not guaranteed.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to prepend to all ops created by this distribution.
@@ -222,7 +226,20 @@
#### `tf.contrib.distributions.Exponential.mode(name='mode')` {#Exponential.mode}
-Mode of each batch member. Defined only if alpha >= 1.
+Mode of each batch member.
+
+The mode of a gamma distribution is `(alpha - 1) / beta` when `alpha > 1`,
+and `NaN` otherwise. If `self.strict_statistics` is `True`, an exception
+will be raised rather than returning `NaN`.
+
+##### Args:
+
+
+* <b>`name`</b>: A name to give this op.
+
+##### Returns:
+
+ The mode for every batch member, a `Tensor` with same `dtype` as self.
- - -
@@ -291,6 +308,13 @@
- - -
+#### `tf.contrib.distributions.Exponential.strict_statistics` {#Exponential.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Exponential.variance(name='variance')` {#Exponential.variance}
Variance of each batch member.
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.Gamma.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.Gamma.md
index 5cbbe87..0c53a96 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.Gamma.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.Gamma.md
@@ -20,7 +20,7 @@
```
- - -
-#### `tf.contrib.distributions.Gamma.__init__(alpha, beta, strict=True, name='Gamma')` {#Gamma.__init__}
+#### `tf.contrib.distributions.Gamma.__init__(alpha, beta, strict=True, strict_statistics=True, name='Gamma')` {#Gamma.__init__}
Construct Gamma distributions with parameters `alpha` and `beta`.
@@ -39,6 +39,10 @@
* <b>`strict`</b>: Whether to assert that `a > 0, b > 0`, and that `x > 0` in the
methods `pdf(x)` and `log_pdf(x)`. If `strict` is False
and the inputs are invalid, correct behavior is not guaranteed.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to prepend to all ops created by this distribution.
##### Raises:
@@ -239,7 +243,20 @@
#### `tf.contrib.distributions.Gamma.mode(name='mode')` {#Gamma.mode}
-Mode of each batch member. Defined only if alpha >= 1.
+Mode of each batch member.
+
+The mode of a gamma distribution is `(alpha - 1) / beta` when `alpha > 1`,
+and `NaN` otherwise. If `self.strict_statistics` is `True`, an exception
+will be raised rather than returning `NaN`.
+
+##### Args:
+
+
+* <b>`name`</b>: A name to give this op.
+
+##### Returns:
+
+ The mode for every batch member, a `Tensor` with same `dtype` as self.
- - -
@@ -311,6 +328,13 @@
- - -
+#### `tf.contrib.distributions.Gamma.strict_statistics` {#Gamma.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Gamma.variance(name='variance')` {#Gamma.variance}
Variance of each batch member.
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.BaseDistribution.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.BaseDistribution.md
index 9b34cc2..1ad699c 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.BaseDistribution.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.BaseDistribution.md
@@ -92,11 +92,11 @@
b = tf.exp(tf.matmul(logits, weights_b))
# Will raise exception if ANY batch member has a < 1 or b < 1.
-dist = distributions.beta(a, b, allow_nan=False) # default is False
+dist = distributions.beta(a, b, strict_statistics=True) # default is True
mode = dist.mode().eval()
# Will return NaN for batch members with either a < 1 or b < 1.
-dist = distributions.beta(a, b, allow_nan=True)
+dist = distributions.beta(a, b, strict_statistics=False)
mode = dist.mode().eval()
```
@@ -105,7 +105,7 @@
```python
# Will raise an exception if any Op is run.
negative_a = -1.0 * a # beta distribution by definition has a > 0.
-dist = distributions.beta(negative_a, b, allow_nan=True)
+dist = distributions.beta(negative_a, b, strict_statistics=False)
dist.mean().eval()
```
- - -
@@ -246,6 +246,13 @@
- - -
+#### `tf.contrib.distributions.BaseDistribution.strict_statistics` {#BaseDistribution.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.BaseDistribution.variance(name='variance')` {#BaseDistribution.variance}
Variance of the distribution.
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.DiscreteDistribution.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.DiscreteDistribution.md
index 429ec86..f5ced73 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.DiscreteDistribution.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.DiscreteDistribution.md
@@ -167,6 +167,13 @@
- - -
+#### `tf.contrib.distributions.DiscreteDistribution.strict_statistics` {#DiscreteDistribution.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.DiscreteDistribution.variance(name='variance')` {#DiscreteDistribution.variance}
Variance of the distribution.
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.Normal.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.Normal.md
index e22e650..4916f88 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.Normal.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.Normal.md
@@ -42,7 +42,7 @@
```
- - -
-#### `tf.contrib.distributions.Normal.__init__(mu, sigma, strict=True, name='Normal')` {#Normal.__init__}
+#### `tf.contrib.distributions.Normal.__init__(mu, sigma, strict=True, strict_statistics=True, name='Normal')` {#Normal.__init__}
Construct Normal distributions with mean and stddev `mu` and `sigma`.
@@ -57,6 +57,10 @@
sigma must contain only positive values.
* <b>`strict`</b>: Whether to assert that `sigma > 0`. If `strict` is False,
correct output is not guaranteed when input is invalid.
+* <b>`strict_statistics`</b>: Boolean, default True. If True, raise an exception if
+ a statistic (e.g. mean/mode/etc...) is undefined for any batch member.
+ If False, batch members with valid parameters leading to undefined
+ statistics will return NaN for this statistic.
* <b>`name`</b>: The name to give Ops created by the initializer.
##### Raises:
@@ -307,6 +311,13 @@
- - -
+#### `tf.contrib.distributions.Normal.strict_statistics` {#Normal.strict_statistics}
+
+Boolean describing behavior when a stat is undefined for batch member.
+
+
+- - -
+
#### `tf.contrib.distributions.Normal.variance(name='variance')` {#Normal.variance}
Variance of this distribution.