From f40302caddb44249c665b9a66e27a33f06167264 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Thu, 23 Jun 2016 15:04:50 -0800 Subject: [PATCH] Update generated Python Op docs. Change: 125729946 --- tensorflow/g3doc/api_docs/python/array_ops.md | 24 ++- .../api_docs/python/contrib.distributions.md | 147 ++++++++++++++++-- .../tf.contrib.distributions.Bernoulli.md | 7 + .../tf.contrib.distributions.StudentT.md | 11 +- .../tf.contrib.distributions.Categorical.md | 20 ++- .../shard2/tf.contrib.distributions.Chi2.md | 21 ++- .../tf.contrib.distributions.Uniform.md | 13 +- ...ib.distributions.ContinuousDistribution.md | 7 + ...trib.distributions.DirichletMultinomial.md | 12 +- .../tf.contrib.distributions.Exponential.md | 19 ++- .../shard3/tf.contrib.distributions.Gamma.md | 12 +- .../functions_and_classes/shard3/tf.pack.md | 9 +- .../functions_and_classes/shard4/tf.unpack.md | 15 +- ....contrib.distributions.BaseDistribution.md | 7 + ...trib.distributions.DiscreteDistribution.md | 7 + .../shard7/tf.contrib.distributions.Normal.md | 11 +- 16 files changed, 296 insertions(+), 46 deletions(-) diff --git a/tensorflow/g3doc/api_docs/python/array_ops.md b/tensorflow/g3doc/api_docs/python/array_ops.md index c944792c3fe..f41bdd4205a 100644 --- a/tensorflow/g3doc/api_docs/python/array_ops.md +++ b/tensorflow/g3doc/api_docs/python/array_ops.md @@ -727,7 +727,7 @@ tf.shape(tf.concat(1, [t3, t4])) ==> [2, 6] - - - -### `tf.pack(values, name='pack')` {#pack} +### `tf.pack(values, axis=0, name='pack')` {#pack} Packs a list of rank-`R` tensors into one rank-`(R+1)` tensor. @@ -743,6 +743,8 @@ This is the opposite of unpack. The numpy equivalent is * `values`: A list of `Tensor` objects with the same shape and type. +* `axis`: An `int`. The axis to pack along. Defaults to the first dimension. + Supports negative indexes. * `name`: A name for this operation (optional). ##### Returns: @@ -750,16 +752,21 @@ This is the opposite of unpack. The numpy equivalent is * `output`: A packed `Tensor` with the same type as `values`. +##### Raises: + + +* `ValueError`: If `axis` is out of the range [-(R+1), R+1). + - - - -### `tf.unpack(value, num=None, name='unpack')` {#unpack} +### `tf.unpack(value, num=None, axis=0, name='unpack')` {#unpack} -Unpacks the outer dimension of a rank-`R` tensor into rank-`(R-1)` tensors. +Unpacks the given dimension of a rank-`R` tensor into rank-`(R-1)` tensors. -Unpacks `num` tensors from `value` along the first dimension. +Unpacks `num` tensors from `value` along the given dimension. If `num` is not specified (the default), it is inferred from `value`'s shape. -If `value.shape[0]` is not known, `ValueError` is raised. +If `value.shape[axis]` is not known, `ValueError` is raised. The ith tensor in `output` is the slice `value[i, ...]`. Each tensor in `output` has shape `value.shape[1:]`. @@ -772,8 +779,10 @@ This is the opposite of pack. The numpy equivalent is * `value`: A rank `R > 0` `Tensor` to be unpacked. -* `num`: An `int`. The first dimension of value. Automatically inferred if - `None` (the default). +* `num`: An `int`. The length of the dimension `axis`. Automatically inferred + if `None` (the default). +* `axis`: An `int`. The axis to unpack along. Defaults to the first + dimension. Supports negative indexes. * `name`: A name for the operation (optional). ##### Returns: @@ -784,6 +793,7 @@ This is the opposite of pack. The numpy equivalent is * `ValueError`: If `num` is unspecified and cannot be inferred. +* `ValueError`: If `axis` is out of the range [-R, R). - - - diff --git a/tensorflow/g3doc/api_docs/python/contrib.distributions.md b/tensorflow/g3doc/api_docs/python/contrib.distributions.md index a2ca2272168..da0ddda8374 100644 --- a/tensorflow/g3doc/api_docs/python/contrib.distributions.md +++ b/tensorflow/g3doc/api_docs/python/contrib.distributions.md @@ -255,6 +255,13 @@ Generate `n` samples. Standard deviation of the distribution. +- - - + +#### `tf.contrib.distributions.BaseDistribution.strict` {#BaseDistribution.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.BaseDistribution.variance(name='variance')` {#BaseDistribution.variance} @@ -441,6 +448,13 @@ Generate `n` samples. Standard deviation of the distribution. +- - - + +#### `tf.contrib.distributions.ContinuousDistribution.strict` {#ContinuousDistribution.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.ContinuousDistribution.variance(name='variance')` {#ContinuousDistribution.variance} @@ -613,6 +627,13 @@ Generate `n` samples. Standard deviation of the distribution. +- - - + +#### `tf.contrib.distributions.DiscreteDistribution.strict` {#DiscreteDistribution.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.DiscreteDistribution.variance(name='variance')` {#DiscreteDistribution.variance} @@ -862,6 +883,13 @@ Standard deviation of the distribution. * `std`: `Tensor` of the same type and shape as `p`. +- - - + +#### `tf.contrib.distributions.Bernoulli.strict` {#Bernoulli.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.Bernoulli.variance(name='variance')` {#Bernoulli.variance} @@ -895,19 +923,20 @@ Note, the following methods of the base class aren't implemented: * log_cdf - - - -#### `tf.contrib.distributions.Categorical.__init__(logits, name='Categorical', dtype=tf.int32)` {#Categorical.__init__} +#### `tf.contrib.distributions.Categorical.__init__(logits, dtype=tf.int32, strict=True, name='Categorical')` {#Categorical.__init__} Initialize Categorical distributions using class log-probabilities. ##### Args: -* `logits`: An N-D `Tensor` representing the log probabilities of a set of - Categorical distributions. The first N - 1 dimensions index into a - batch of independent distributions and the last dimension indexes - into the classes. -* `name`: A name for this distribution (optional). +* `logits`: An N-D `Tensor`, `N >= 1`, representing the log probabilities + of a set of Categorical distributions. The first `N - 1` dimensions + index into a batch of independent distributions and the last dimension + indexes into the classes. * `dtype`: The type of the event samples (default: int32). +* `strict`: Unused in this distribution. +* `name`: A name for this distribution (optional). - - - @@ -1074,6 +1103,13 @@ Sample `n` observations from the Categorical distribution. Standard deviation of the distribution. +- - - + +#### `tf.contrib.distributions.Categorical.strict` {#Categorical.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.Categorical.variance(name='variance')` {#Categorical.variance} @@ -1090,16 +1126,26 @@ The Chi2 distribution with degrees of freedom df. The PDF of this distribution is: -```pdf(x) = (x^(df/2 - 1)e^(-x/2))/(2^(k/2)Gamma(k/2)), x > 0``` +```pdf(x) = (x^(df/2 - 1)e^(-x/2))/(2^(df/2)Gamma(df/2)), x > 0``` Note that the Chi2 distribution is a special case of the Gamma distribution, with Chi2(df) = Gamma(df/2, 1/2). - - - -#### `tf.contrib.distributions.Chi2.__init__(df, name='Chi2')` {#Chi2.__init__} +#### `tf.contrib.distributions.Chi2.__init__(df, strict=True, name='Chi2')` {#Chi2.__init__} + +Construct Chi2 distributions with parameter `df`. +##### Args: +* `df`: `float` or `double` tensor, the degrees of freedom of the + distribution(s). `df` must contain only positive values. +* `strict`: 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. +* `name`: The name to prepend to all ops created by this distribution. + - - - @@ -1363,6 +1409,13 @@ See the doc for tf.random_gamma for further detail. Standard deviation of this distribution. +- - - + +#### `tf.contrib.distributions.Chi2.strict` {#Chi2.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.Chi2.variance(name='variance')` {#Chi2.variance} @@ -1385,10 +1438,20 @@ Note that the Exponential distribution is a special case of the Gamma distribution, with Exponential(lam) = Gamma(1, lam). - - - -#### `tf.contrib.distributions.Exponential.__init__(lam, name='Exponential')` {#Exponential.__init__} +#### `tf.contrib.distributions.Exponential.__init__(lam, strict=True, name='Exponential')` {#Exponential.__init__} +Construct Exponential distribution with parameter `lam`. + +##### Args: +* `lam`: `float` or `double` tensor, the rate of the distribution(s). + `lam` must contain only positive values. +* `strict`: 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. +* `name`: The name to prepend to all ops created by this distribution. + - - - @@ -1649,6 +1712,13 @@ Sample `n` observations from the Exponential Distributions. Standard deviation of this distribution. +- - - + +#### `tf.contrib.distributions.Exponential.strict` {#Exponential.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.Exponential.variance(name='variance')` {#Exponential.variance} @@ -1683,7 +1753,7 @@ dist2 = Gamma(alpha=[3.0, 4.0], beta=[2.0, 3.0]) ``` - - - -#### `tf.contrib.distributions.Gamma.__init__(alpha, beta, name='Gamma')` {#Gamma.__init__} +#### `tf.contrib.distributions.Gamma.__init__(alpha, beta, strict=True, name='Gamma')` {#Gamma.__init__} Construct Gamma distributions with parameters `alpha` and `beta`. @@ -1699,6 +1769,9 @@ broadcasting (e.g. `alpha + beta` is a valid operation). * `beta`: `float` or `double` tensor, the inverse scale params of the distribution(s). beta must contain only positive values. +* `strict`: 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. * `name`: The name to prepend to all ops created by this distribution. ##### Raises: @@ -1962,6 +2035,13 @@ See the doc for tf.random_gamma for further detail. Standard deviation of this distribution. +- - - + +#### `tf.contrib.distributions.Gamma.strict` {#Gamma.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.Gamma.variance(name='variance')` {#Gamma.variance} @@ -2018,7 +2098,7 @@ dist.pdf(3.0) ``` - - - -#### `tf.contrib.distributions.Normal.__init__(mu, sigma, name='Normal')` {#Normal.__init__} +#### `tf.contrib.distributions.Normal.__init__(mu, sigma, strict=True, name='Normal')` {#Normal.__init__} Construct Normal distributions with mean and stddev `mu` and `sigma`. @@ -2031,6 +2111,8 @@ broadcasting (e.g. `mu + sigma` is a valid operation). * `mu`: `float` or `double` tensor, the means of the distribution(s). * `sigma`: `float` or `double` tensor, the stddevs of the distribution(s). sigma must contain only positive values. +* `strict`: Whether to assert that `sigma > 0`. If `strict` is False, + correct output is not guaranteed when input is invalid. * `name`: The name to give Ops created by the initializer. ##### Raises: @@ -2272,6 +2354,13 @@ Distribution parameter for standard deviation. Standard deviation of this distribution. +- - - + +#### `tf.contrib.distributions.Normal.strict` {#Normal.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.Normal.variance(name='variance')` {#Normal.variance} @@ -2331,7 +2420,7 @@ dist.pdf(3.0) ``` - - - -#### `tf.contrib.distributions.StudentT.__init__(df, mu, sigma, name='StudentT')` {#StudentT.__init__} +#### `tf.contrib.distributions.StudentT.__init__(df, mu, sigma, strict=True, name='StudentT')` {#StudentT.__init__} Construct Student's t distributions. @@ -2349,6 +2438,8 @@ broadcasting (e.g. `df + mu + sigma` is a valid operation). * `sigma`: `float` or `double` tensor, the scaling factor for the distribution(s). `sigma` must contain only positive values. Note that `sigma` is not the standard deviation of this distribution. +* `strict`: Whether to assert that `df > 0, sigma > 0`. If `strict` is False + and inputs are invalid, correct behavior is not guaranteed. * `name`: The name to give Ops created by the initializer. ##### Raises: @@ -2543,6 +2634,13 @@ Scaling factors of these Student's t distribution(s). +- - - + +#### `tf.contrib.distributions.StudentT.strict` {#StudentT.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.StudentT.variance(name='variance')` {#StudentT.variance} @@ -2560,7 +2658,7 @@ Uniform distribution with `a` and `b` parameters. The PDF of this distribution is constant between [`a`, `b`], and 0 elsewhere. - - - -#### `tf.contrib.distributions.Uniform.__init__(a=0.0, b=1.0, name='Uniform')` {#Uniform.__init__} +#### `tf.contrib.distributions.Uniform.__init__(a=0.0, b=1.0, strict=True, name='Uniform')` {#Uniform.__init__} Construct Uniform distributions with `a` and `b`. @@ -2590,12 +2688,14 @@ u1 = Uniform(3.0, [5.0, 6.0, 7.0]) # 3 distributions * `a`: `float` or `double` tensor, the minimum endpoint. * `b`: `float` or `double` tensor, the maximum endpoint. Must be > `a`. +* `strict`: Whether to assert that `a > b`. If `strict` is False and inputs + are invalid, correct behavior is not guaranteed. * `name`: The name to prefix Ops created by this distribution class. ##### Raises: -* `InvalidArgumentError`: if `a >= b`. +* `InvalidArgumentError`: if `a >= b` and `strict=True`. - - - @@ -2785,6 +2885,13 @@ Sample `n` observations from the Uniform Distributions. +- - - + +#### `tf.contrib.distributions.Uniform.strict` {#Uniform.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.Uniform.variance(name='variance')` {#Uniform.variance} @@ -3092,7 +3199,7 @@ dist.pmf(counts) # Shape [2] ``` - - - -#### `tf.contrib.distributions.DirichletMultinomial.__init__(n, alpha, name='DirichletMultinomial', allow_arbitrary_counts=False)` {#DirichletMultinomial.__init__} +#### `tf.contrib.distributions.DirichletMultinomial.__init__(n, alpha, allow_arbitrary_counts=False, strict=True, name='DirichletMultinomial')` {#DirichletMultinomial.__init__} Initialize a batch of DirichletMultinomial distributions. @@ -3106,11 +3213,12 @@ Initialize a batch of DirichletMultinomial distributions. * `alpha`: Positive `float` or `double` tensor with shape broadcastable to `[N1,..., Nm, k]` `m >= 0`. Defines this as a batch of `N1 x ... x Nm` different `k` class Dirichlet multinomial distributions. -* `name`: The name to prefix Ops created by this distribution class. * `allow_arbitrary_counts`: Boolean. This represents whether the pmf/cdf allows for the `counts` tensor to be non-integral values. The pmf/cdf are functions that can be evaluated at non-integral values, but are only a distribution over non-negative integers. +* `strict`: Not used (yet). +* `name`: The name to prefix Ops created by this distribution class. * `Examples`: @@ -3339,6 +3447,13 @@ Generate `n` samples. Standard deviation of the distribution. +- - - + +#### `tf.contrib.distributions.DirichletMultinomial.strict` {#DirichletMultinomial.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.DirichletMultinomial.variance(name='variance')` {#DirichletMultinomial.variance} 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 45bd933eada..2eba69a6512 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 @@ -232,6 +232,13 @@ Standard deviation of the distribution. * `std`: `Tensor` of the same type and shape as `p`. +- - - + +#### `tf.contrib.distributions.Bernoulli.strict` {#Bernoulli.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.Bernoulli.variance(name='variance')` {#Bernoulli.variance} 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 a7330480d23..796b095b5fa 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 @@ dist.pdf(3.0) ``` - - - -#### `tf.contrib.distributions.StudentT.__init__(df, mu, sigma, name='StudentT')` {#StudentT.__init__} +#### `tf.contrib.distributions.StudentT.__init__(df, mu, sigma, strict=True, name='StudentT')` {#StudentT.__init__} Construct Student's t distributions. @@ -63,6 +63,8 @@ broadcasting (e.g. `df + mu + sigma` is a valid operation). * `sigma`: `float` or `double` tensor, the scaling factor for the distribution(s). `sigma` must contain only positive values. Note that `sigma` is not the standard deviation of this distribution. +* `strict`: Whether to assert that `df > 0, sigma > 0`. If `strict` is False + and inputs are invalid, correct behavior is not guaranteed. * `name`: The name to give Ops created by the initializer. ##### Raises: @@ -257,6 +259,13 @@ Scaling factors of these Student's t distribution(s). +- - - + +#### `tf.contrib.distributions.StudentT.strict` {#StudentT.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.StudentT.variance(name='variance')` {#StudentT.variance} 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 5f866ee960b..8f4fad21db1 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,19 +9,20 @@ Note, the following methods of the base class aren't implemented: * log_cdf - - - -#### `tf.contrib.distributions.Categorical.__init__(logits, name='Categorical', dtype=tf.int32)` {#Categorical.__init__} +#### `tf.contrib.distributions.Categorical.__init__(logits, dtype=tf.int32, strict=True, name='Categorical')` {#Categorical.__init__} Initialize Categorical distributions using class log-probabilities. ##### Args: -* `logits`: An N-D `Tensor` representing the log probabilities of a set of - Categorical distributions. The first N - 1 dimensions index into a - batch of independent distributions and the last dimension indexes - into the classes. -* `name`: A name for this distribution (optional). +* `logits`: An N-D `Tensor`, `N >= 1`, representing the log probabilities + of a set of Categorical distributions. The first `N - 1` dimensions + index into a batch of independent distributions and the last dimension + indexes into the classes. * `dtype`: The type of the event samples (default: int32). +* `strict`: Unused in this distribution. +* `name`: A name for this distribution (optional). - - - @@ -188,6 +189,13 @@ Sample `n` observations from the Categorical distribution. Standard deviation of the distribution. +- - - + +#### `tf.contrib.distributions.Categorical.strict` {#Categorical.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.Categorical.variance(name='variance')` {#Categorical.variance} 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 d104424bea4..9dc4439a24a 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 @@ -2,16 +2,26 @@ The Chi2 distribution with degrees of freedom df. The PDF of this distribution is: -```pdf(x) = (x^(df/2 - 1)e^(-x/2))/(2^(k/2)Gamma(k/2)), x > 0``` +```pdf(x) = (x^(df/2 - 1)e^(-x/2))/(2^(df/2)Gamma(df/2)), x > 0``` Note that the Chi2 distribution is a special case of the Gamma distribution, with Chi2(df) = Gamma(df/2, 1/2). - - - -#### `tf.contrib.distributions.Chi2.__init__(df, name='Chi2')` {#Chi2.__init__} +#### `tf.contrib.distributions.Chi2.__init__(df, strict=True, name='Chi2')` {#Chi2.__init__} +Construct Chi2 distributions with parameter `df`. + +##### Args: +* `df`: `float` or `double` tensor, the degrees of freedom of the + distribution(s). `df` must contain only positive values. +* `strict`: 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. +* `name`: The name to prepend to all ops created by this distribution. + - - - @@ -275,6 +285,13 @@ See the doc for tf.random_gamma for further detail. Standard deviation of this distribution. +- - - + +#### `tf.contrib.distributions.Chi2.strict` {#Chi2.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.Chi2.variance(name='variance')` {#Chi2.variance} 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 9bd88304f44..23244e5739d 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 @@ Uniform distribution with `a` and `b` parameters. The PDF of this distribution is constant between [`a`, `b`], and 0 elsewhere. - - - -#### `tf.contrib.distributions.Uniform.__init__(a=0.0, b=1.0, name='Uniform')` {#Uniform.__init__} +#### `tf.contrib.distributions.Uniform.__init__(a=0.0, b=1.0, strict=True, name='Uniform')` {#Uniform.__init__} Construct Uniform distributions with `a` and `b`. @@ -33,12 +33,14 @@ u1 = Uniform(3.0, [5.0, 6.0, 7.0]) # 3 distributions * `a`: `float` or `double` tensor, the minimum endpoint. * `b`: `float` or `double` tensor, the maximum endpoint. Must be > `a`. +* `strict`: Whether to assert that `a > b`. If `strict` is False and inputs + are invalid, correct behavior is not guaranteed. * `name`: The name to prefix Ops created by this distribution class. ##### Raises: -* `InvalidArgumentError`: if `a >= b`. +* `InvalidArgumentError`: if `a >= b` and `strict=True`. - - - @@ -228,6 +230,13 @@ Sample `n` observations from the Uniform Distributions. +- - - + +#### `tf.contrib.distributions.Uniform.strict` {#Uniform.strict} + +Boolean describing behavior on invalid input. + + - - - #### `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 21c3a832aa7..27313415615 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 @@ -172,6 +172,13 @@ Generate `n` samples. Standard deviation of the distribution. +- - - + +#### `tf.contrib.distributions.ContinuousDistribution.strict` {#ContinuousDistribution.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.ContinuousDistribution.variance(name='variance')` {#ContinuousDistribution.variance} 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 ee5d52c7e0f..7d10bdfa1f0 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 @@ dist.pmf(counts) # Shape [2] ``` - - - -#### `tf.contrib.distributions.DirichletMultinomial.__init__(n, alpha, name='DirichletMultinomial', allow_arbitrary_counts=False)` {#DirichletMultinomial.__init__} +#### `tf.contrib.distributions.DirichletMultinomial.__init__(n, alpha, allow_arbitrary_counts=False, strict=True, name='DirichletMultinomial')` {#DirichletMultinomial.__init__} Initialize a batch of DirichletMultinomial distributions. @@ -81,11 +81,12 @@ Initialize a batch of DirichletMultinomial distributions. * `alpha`: Positive `float` or `double` tensor with shape broadcastable to `[N1,..., Nm, k]` `m >= 0`. Defines this as a batch of `N1 x ... x Nm` different `k` class Dirichlet multinomial distributions. -* `name`: The name to prefix Ops created by this distribution class. * `allow_arbitrary_counts`: Boolean. This represents whether the pmf/cdf allows for the `counts` tensor to be non-integral values. The pmf/cdf are functions that can be evaluated at non-integral values, but are only a distribution over non-negative integers. +* `strict`: Not used (yet). +* `name`: The name to prefix Ops created by this distribution class. * `Examples`: @@ -314,6 +315,13 @@ Generate `n` samples. Standard deviation of the distribution. +- - - + +#### `tf.contrib.distributions.DirichletMultinomial.strict` {#DirichletMultinomial.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.DirichletMultinomial.variance(name='variance')` {#DirichletMultinomial.variance} 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 0ed5ec80943..771195f1d88 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,10 +8,20 @@ Note that the Exponential distribution is a special case of the Gamma distribution, with Exponential(lam) = Gamma(1, lam). - - - -#### `tf.contrib.distributions.Exponential.__init__(lam, name='Exponential')` {#Exponential.__init__} +#### `tf.contrib.distributions.Exponential.__init__(lam, strict=True, name='Exponential')` {#Exponential.__init__} +Construct Exponential distribution with parameter `lam`. + +##### Args: +* `lam`: `float` or `double` tensor, the rate of the distribution(s). + `lam` must contain only positive values. +* `strict`: 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. +* `name`: The name to prepend to all ops created by this distribution. + - - - @@ -272,6 +282,13 @@ Sample `n` observations from the Exponential Distributions. Standard deviation of this distribution. +- - - + +#### `tf.contrib.distributions.Exponential.strict` {#Exponential.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.Exponential.variance(name='variance')` {#Exponential.variance} 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 8a704e1e7da..5cbbe879bfe 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 @@ dist2 = Gamma(alpha=[3.0, 4.0], beta=[2.0, 3.0]) ``` - - - -#### `tf.contrib.distributions.Gamma.__init__(alpha, beta, name='Gamma')` {#Gamma.__init__} +#### `tf.contrib.distributions.Gamma.__init__(alpha, beta, strict=True, name='Gamma')` {#Gamma.__init__} Construct Gamma distributions with parameters `alpha` and `beta`. @@ -36,6 +36,9 @@ broadcasting (e.g. `alpha + beta` is a valid operation). * `beta`: `float` or `double` tensor, the inverse scale params of the distribution(s). beta must contain only positive values. +* `strict`: 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. * `name`: The name to prepend to all ops created by this distribution. ##### Raises: @@ -299,6 +302,13 @@ See the doc for tf.random_gamma for further detail. Standard deviation of this distribution. +- - - + +#### `tf.contrib.distributions.Gamma.strict` {#Gamma.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.Gamma.variance(name='variance')` {#Gamma.variance} diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.pack.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.pack.md index 75a5fbe15ca..f27db7f00ca 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.pack.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.pack.md @@ -1,4 +1,4 @@ -### `tf.pack(values, name='pack')` {#pack} +### `tf.pack(values, axis=0, name='pack')` {#pack} Packs a list of rank-`R` tensors into one rank-`(R+1)` tensor. @@ -14,6 +14,8 @@ This is the opposite of unpack. The numpy equivalent is * `values`: A list of `Tensor` objects with the same shape and type. +* `axis`: An `int`. The axis to pack along. Defaults to the first dimension. + Supports negative indexes. * `name`: A name for this operation (optional). ##### Returns: @@ -21,3 +23,8 @@ This is the opposite of unpack. The numpy equivalent is * `output`: A packed `Tensor` with the same type as `values`. +##### Raises: + + +* `ValueError`: If `axis` is out of the range [-(R+1), R+1). + diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.unpack.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.unpack.md index cc4884c720f..80f583322f9 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.unpack.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.unpack.md @@ -1,10 +1,10 @@ -### `tf.unpack(value, num=None, name='unpack')` {#unpack} +### `tf.unpack(value, num=None, axis=0, name='unpack')` {#unpack} -Unpacks the outer dimension of a rank-`R` tensor into rank-`(R-1)` tensors. +Unpacks the given dimension of a rank-`R` tensor into rank-`(R-1)` tensors. -Unpacks `num` tensors from `value` along the first dimension. +Unpacks `num` tensors from `value` along the given dimension. If `num` is not specified (the default), it is inferred from `value`'s shape. -If `value.shape[0]` is not known, `ValueError` is raised. +If `value.shape[axis]` is not known, `ValueError` is raised. The ith tensor in `output` is the slice `value[i, ...]`. Each tensor in `output` has shape `value.shape[1:]`. @@ -17,8 +17,10 @@ This is the opposite of pack. The numpy equivalent is * `value`: A rank `R > 0` `Tensor` to be unpacked. -* `num`: An `int`. The first dimension of value. Automatically inferred if - `None` (the default). +* `num`: An `int`. The length of the dimension `axis`. Automatically inferred + if `None` (the default). +* `axis`: An `int`. The axis to unpack along. Defaults to the first + dimension. Supports negative indexes. * `name`: A name for the operation (optional). ##### Returns: @@ -29,4 +31,5 @@ This is the opposite of pack. The numpy equivalent is * `ValueError`: If `num` is unspecified and cannot be inferred. +* `ValueError`: If `axis` is out of the range [-R, R). 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 cfca844ed61..9b34cc20ce7 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 @@ -237,6 +237,13 @@ Generate `n` samples. Standard deviation of the distribution. +- - - + +#### `tf.contrib.distributions.BaseDistribution.strict` {#BaseDistribution.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.BaseDistribution.variance(name='variance')` {#BaseDistribution.variance} 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 cde12fd076b..429ec86be39 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 @@ -158,6 +158,13 @@ Generate `n` samples. Standard deviation of the distribution. +- - - + +#### `tf.contrib.distributions.DiscreteDistribution.strict` {#DiscreteDistribution.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.DiscreteDistribution.variance(name='variance')` {#DiscreteDistribution.variance} 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 d52e41a0b37..e22e650a23a 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 @@ dist.pdf(3.0) ``` - - - -#### `tf.contrib.distributions.Normal.__init__(mu, sigma, name='Normal')` {#Normal.__init__} +#### `tf.contrib.distributions.Normal.__init__(mu, sigma, strict=True, name='Normal')` {#Normal.__init__} Construct Normal distributions with mean and stddev `mu` and `sigma`. @@ -55,6 +55,8 @@ broadcasting (e.g. `mu + sigma` is a valid operation). * `mu`: `float` or `double` tensor, the means of the distribution(s). * `sigma`: `float` or `double` tensor, the stddevs of the distribution(s). sigma must contain only positive values. +* `strict`: Whether to assert that `sigma > 0`. If `strict` is False, + correct output is not guaranteed when input is invalid. * `name`: The name to give Ops created by the initializer. ##### Raises: @@ -296,6 +298,13 @@ Distribution parameter for standard deviation. Standard deviation of this distribution. +- - - + +#### `tf.contrib.distributions.Normal.strict` {#Normal.strict} + +Boolean describing behavior on invalid input. + + - - - #### `tf.contrib.distributions.Normal.variance(name='variance')` {#Normal.variance} -- GitLab