diff options
author | 2016-07-19 15:04:53 -0800 | |
---|---|---|
committer | 2016-07-19 16:16:13 -0700 | |
commit | a423880b2338338645d2bc06929fd225db192f6d (patch) | |
tree | 4342e4591f8bf9d0b6484f5e81488d720338df7e | |
parent | 71d42677347129119c70f580daf931c95b43a44a (diff) |
Update generated Python Op docs.
Change: 127885597
18 files changed, 878 insertions, 58 deletions
diff --git a/tensorflow/g3doc/api_docs/python/contrib.distributions.md b/tensorflow/g3doc/api_docs/python/contrib.distributions.md index c5adf4a34a..ec6d739a7b 100644 --- a/tensorflow/g3doc/api_docs/python/contrib.distributions.md +++ b/tensorflow/g3doc/api_docs/python/contrib.distributions.md @@ -39,15 +39,16 @@ All distributions support batches of independent distributions of that type. The batch shape is determined by broadcasting together the parameters. The shape of arguments to `__init__`, `cdf`, `log_cdf`, `prob`, and -`log_prob` reflect this broadcasting, as does the return value of `sample`. +`log_prob` reflect this broadcasting, as does the return value of `sample` and +`sample_n`. -`sample_shape = (n,) + batch_shape + event_shape`, where `sample_shape` is the -shape of the `Tensor` returned from `sample`, `n` is the number of samples, -`batch_shape` defines how many independent distributions there are, and -`event_shape` defines the shape of samples from each of those independent -distributions. Samples are independent along the `batch_shape` dimensions, -but not necessarily so along the `event_shape` dimensions (dependending on -the particulars of the underlying distribution). +`sample_n_shape = (n,) + batch_shape + event_shape`, where `sample_n_shape` is +the shape of the `Tensor` returned from `sample_n`, `n` is the number of +samples, `batch_shape` defines how many independent distributions there are, +and `event_shape` defines the shape of samples from each of those independent +distributions. Samples are independent along the `batch_shape` dimensions, but +not necessarily so along the `event_shape` dimensions (dependending on the +particulars of the underlying distribution). Using the `Uniform` distribution as an example: @@ -69,7 +70,7 @@ event_shape_t = u.event_shape # Sampling returns a sample per distribution. `samples` has shape # (5, 2, 2), which is (n,) + batch_shape + event_shape, where n=5, # batch_shape=(2, 2), and event_shape=(). -samples = u.sample(5) +samples = u.sample_n(5) # The broadcasting holds across methods. Here we use `cdf` as an example. The # same holds for `log_cdf` and the likelihood functions. @@ -277,7 +278,31 @@ Probability density/mass function. - - - -#### `tf.contrib.distributions.Distribution.sample(n, seed=None, name='sample')` {#Distribution.sample} +#### `tf.contrib.distributions.Distribution.sample(sample_shape=(), seed=None, name='sample')` {#Distribution.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Distribution.sample_n(n, seed=None, name='sample_n')` {#Distribution.sample_n} Generate `n` samples. @@ -578,7 +603,31 @@ Probability mass function. - - - -#### `tf.contrib.distributions.Bernoulli.sample(n, seed=None, name='sample')` {#Bernoulli.sample} +#### `tf.contrib.distributions.Bernoulli.sample(sample_shape=(), seed=None, name='sample')` {#Bernoulli.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Bernoulli.sample_n(n, seed=None, name='sample_n')` {#Bernoulli.sample_n} Generate `n` samples. @@ -970,7 +1019,31 @@ The probability mass function. - - - -#### `tf.contrib.distributions.Beta.sample(n, seed=None, name='sample')` {#Beta.sample} +#### `tf.contrib.distributions.Beta.sample(sample_shape=(), seed=None, name='sample')` {#Beta.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Beta.sample_n(n, seed=None, name='sample_n')` {#Beta.sample_n} Sample `n` observations from the Beta Distributions. @@ -1145,7 +1218,8 @@ Log-probability of class `k`. ##### Args: -* <b>`k`</b>: `int32` or `int64` Tensor with shape = `self.batch_shape()`. +* <b>`k`</b>: `int32` or `int64` Tensor. Must be broadcastable with a `batch_shape` + `Tensor`. * <b>`name`</b>: A name for this operation (optional). ##### Returns: @@ -1211,7 +1285,7 @@ Probability of class `k`. ##### Args: -* <b>`k`</b>: `int32` or `int64` Tensor with shape = `self.batch_shape()`. +* <b>`k`</b>: `int32` or `int64` Tensor. Must be broadcastable with logits. * <b>`name`</b>: A name for this operation (optional). ##### Returns: @@ -1221,7 +1295,31 @@ Probability of class `k`. - - - -#### `tf.contrib.distributions.Categorical.sample(n, seed=None, name='sample')` {#Categorical.sample} +#### `tf.contrib.distributions.Categorical.sample(sample_shape=(), seed=None, name='sample')` {#Categorical.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Categorical.sample_n(n, seed=None, name='sample_n')` {#Categorical.sample_n} Sample `n` observations from the Categorical distribution. @@ -1574,7 +1672,31 @@ Pdf of observations in `x` under these Gamma distribution(s). - - - -#### `tf.contrib.distributions.Chi2.sample(n, seed=None, name='sample')` {#Chi2.sample} +#### `tf.contrib.distributions.Chi2.sample(sample_shape=(), seed=None, name='sample')` {#Chi2.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Chi2.sample_n(n, seed=None, name='sample_n')` {#Chi2.sample_n} Draws `n` samples from the Gamma distribution(s). @@ -1932,7 +2054,31 @@ Pdf of observations in `x` under these Gamma distribution(s). - - - -#### `tf.contrib.distributions.Exponential.sample(n, seed=None, name=None)` {#Exponential.sample} +#### `tf.contrib.distributions.Exponential.sample(sample_shape=(), seed=None, name='sample')` {#Exponential.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Exponential.sample_n(n, seed=None, name='sample_n')` {#Exponential.sample_n} Sample `n` observations from the Exponential Distributions. @@ -2304,7 +2450,31 @@ Pdf of observations in `x` under these Gamma distribution(s). - - - -#### `tf.contrib.distributions.Gamma.sample(n, seed=None, name='sample')` {#Gamma.sample} +#### `tf.contrib.distributions.Gamma.sample(sample_shape=(), seed=None, name='sample')` {#Gamma.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Gamma.sample_n(n, seed=None, name='sample_n')` {#Gamma.sample_n} Draws `n` samples from the Gamma distribution(s). @@ -2689,7 +2859,31 @@ Pdf of observations in `x` under these Gamma distribution(s). - - - -#### `tf.contrib.distributions.InverseGamma.sample(n, seed=None, name='sample')` {#InverseGamma.sample} +#### `tf.contrib.distributions.InverseGamma.sample(sample_shape=(), seed=None, name='sample')` {#InverseGamma.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.InverseGamma.sample_n(n, seed=None, name='sample_n')` {#InverseGamma.sample_n} Draws `n` samples from these InverseGamma distribution(s). @@ -3032,7 +3226,31 @@ The prob of observations in `x` under the Laplace distribution(s). - - - -#### `tf.contrib.distributions.Laplace.sample(n, seed=None, name='sample')` {#Laplace.sample} +#### `tf.contrib.distributions.Laplace.sample(sample_shape=(), seed=None, name='sample')` {#Laplace.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Laplace.sample_n(n, seed=None, name='sample_n')` {#Laplace.sample_n} Sample `n` observations from the Laplace Distributions. @@ -3390,7 +3608,31 @@ The PDF of observations in `x` under these Normal distribution(s). - - - -#### `tf.contrib.distributions.Normal.sample(n, seed=None, name='sample')` {#Normal.sample} +#### `tf.contrib.distributions.Normal.sample(sample_shape=(), seed=None, name='sample')` {#Normal.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Normal.sample_n(n, seed=None, name='sample_n')` {#Normal.sample_n} Sample `n` observations from the Normal Distributions. @@ -3722,7 +3964,31 @@ The PDF of observations in `x` under these Student's t distribution(s). - - - -#### `tf.contrib.distributions.StudentT.sample(n, seed=None, name='sample')` {#StudentT.sample} +#### `tf.contrib.distributions.StudentT.sample(sample_shape=(), seed=None, name='sample')` {#StudentT.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.StudentT.sample_n(n, seed=None, name='sample_n')` {#StudentT.sample_n} Sample `n` observations from the Student t Distributions. @@ -4040,7 +4306,31 @@ The PDF of observations in `x` under these Uniform distribution(s). - - - -#### `tf.contrib.distributions.Uniform.sample(n, seed=None, name='sample')` {#Uniform.sample} +#### `tf.contrib.distributions.Uniform.sample(sample_shape=(), seed=None, name='sample')` {#Uniform.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Uniform.sample_n(n, seed=None, name='sample_n')` {#Uniform.sample_n} Sample `n` observations from the Uniform Distributions. @@ -4365,7 +4655,31 @@ OR - - - -#### `tf.contrib.distributions.MultivariateNormalFull.sample(n, seed=None, name='sample')` {#MultivariateNormalFull.sample} +#### `tf.contrib.distributions.MultivariateNormalFull.sample(sample_shape=(), seed=None, name='sample')` {#MultivariateNormalFull.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.MultivariateNormalFull.sample_n(n, seed=None, name='sample_n')` {#MultivariateNormalFull.sample_n} Sample `n` observations from the Multivariate Normal Distributions. @@ -4704,7 +5018,31 @@ OR - - - -#### `tf.contrib.distributions.MultivariateNormalCholesky.sample(n, seed=None, name='sample')` {#MultivariateNormalCholesky.sample} +#### `tf.contrib.distributions.MultivariateNormalCholesky.sample(sample_shape=(), seed=None, name='sample')` {#MultivariateNormalCholesky.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.MultivariateNormalCholesky.sample_n(n, seed=None, name='sample_n')` {#MultivariateNormalCholesky.sample_n} Sample `n` observations from the Multivariate Normal Distributions. @@ -5138,9 +5476,33 @@ The probability mass function. - - - -#### `tf.contrib.distributions.Dirichlet.sample(n, seed=None, name='sample')` {#Dirichlet.sample} +#### `tf.contrib.distributions.Dirichlet.sample(sample_shape=(), seed=None, name='sample')` {#Dirichlet.sample} -Sample `n` observations from the Normal Distributions. +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Dirichlet.sample_n(n, seed=None, name='sample_n')` {#Dirichlet.sample_n} + +Sample `n` observations from the distributions. ##### Args: @@ -5523,7 +5885,31 @@ probability includes a combinatorial coefficient. - - - -#### `tf.contrib.distributions.DirichletMultinomial.sample(n, seed=None, name='sample')` {#DirichletMultinomial.sample} +#### `tf.contrib.distributions.DirichletMultinomial.sample(sample_shape=(), seed=None, name='sample')` {#DirichletMultinomial.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.DirichletMultinomial.sample_n(n, seed=None, name='sample_n')` {#DirichletMultinomial.sample_n} Generate `n` samples. @@ -5860,7 +6246,31 @@ The prob of observations in `y`. - - - -#### `tf.contrib.distributions.TransformedDistribution.sample(n, seed=None, name='sample')` {#TransformedDistribution.sample} +#### `tf.contrib.distributions.TransformedDistribution.sample(sample_shape=(), seed=None, name='sample')` {#TransformedDistribution.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.TransformedDistribution.sample_n(n, seed=None, name='sample_n')` {#TransformedDistribution.sample_n} Sample `n` observations. 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 a85613e709..0162e518d3 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 @@ -245,7 +245,31 @@ Probability mass function. - - - -#### `tf.contrib.distributions.Bernoulli.sample(n, seed=None, name='sample')` {#Bernoulli.sample} +#### `tf.contrib.distributions.Bernoulli.sample(sample_shape=(), seed=None, name='sample')` {#Bernoulli.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Bernoulli.sample_n(n, seed=None, name='sample_n')` {#Bernoulli.sample_n} Generate `n` samples. diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.Dirichlet.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.Dirichlet.md index babf301454..1fe3d6f56b 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.Dirichlet.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.Dirichlet.md @@ -308,9 +308,33 @@ The probability mass function. - - - -#### `tf.contrib.distributions.Dirichlet.sample(n, seed=None, name='sample')` {#Dirichlet.sample} +#### `tf.contrib.distributions.Dirichlet.sample(sample_shape=(), seed=None, name='sample')` {#Dirichlet.sample} -Sample `n` observations from the Normal Distributions. +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Dirichlet.sample_n(n, seed=None, name='sample_n')` {#Dirichlet.sample_n} + +Sample `n` observations from the distributions. ##### Args: diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.Distribution.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.Distribution.md index b4cc82ddc2..27559a8e4d 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.Distribution.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.Distribution.md @@ -21,15 +21,16 @@ All distributions support batches of independent distributions of that type. The batch shape is determined by broadcasting together the parameters. The shape of arguments to `__init__`, `cdf`, `log_cdf`, `prob`, and -`log_prob` reflect this broadcasting, as does the return value of `sample`. +`log_prob` reflect this broadcasting, as does the return value of `sample` and +`sample_n`. -`sample_shape = (n,) + batch_shape + event_shape`, where `sample_shape` is the -shape of the `Tensor` returned from `sample`, `n` is the number of samples, -`batch_shape` defines how many independent distributions there are, and -`event_shape` defines the shape of samples from each of those independent -distributions. Samples are independent along the `batch_shape` dimensions, -but not necessarily so along the `event_shape` dimensions (dependending on -the particulars of the underlying distribution). +`sample_n_shape = (n,) + batch_shape + event_shape`, where `sample_n_shape` is +the shape of the `Tensor` returned from `sample_n`, `n` is the number of +samples, `batch_shape` defines how many independent distributions there are, +and `event_shape` defines the shape of samples from each of those independent +distributions. Samples are independent along the `batch_shape` dimensions, but +not necessarily so along the `event_shape` dimensions (dependending on the +particulars of the underlying distribution). Using the `Uniform` distribution as an example: @@ -51,7 +52,7 @@ event_shape_t = u.event_shape # Sampling returns a sample per distribution. `samples` has shape # (5, 2, 2), which is (n,) + batch_shape + event_shape, where n=5, # batch_shape=(2, 2), and event_shape=(). -samples = u.sample(5) +samples = u.sample_n(5) # The broadcasting holds across methods. Here we use `cdf` as an example. The # same holds for `log_cdf` and the likelihood functions. @@ -259,7 +260,31 @@ Probability density/mass function. - - - -#### `tf.contrib.distributions.Distribution.sample(n, seed=None, name='sample')` {#Distribution.sample} +#### `tf.contrib.distributions.Distribution.sample(sample_shape=(), seed=None, name='sample')` {#Distribution.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Distribution.sample_n(n, seed=None, name='sample_n')` {#Distribution.sample_n} Generate `n` samples. diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.MultivariateNormalCholesky.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.MultivariateNormalCholesky.md index e3745642c3..f93ae572dd 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.MultivariateNormalCholesky.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.contrib.distributions.MultivariateNormalCholesky.md @@ -272,7 +272,31 @@ OR - - - -#### `tf.contrib.distributions.MultivariateNormalCholesky.sample(n, seed=None, name='sample')` {#MultivariateNormalCholesky.sample} +#### `tf.contrib.distributions.MultivariateNormalCholesky.sample(sample_shape=(), seed=None, name='sample')` {#MultivariateNormalCholesky.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.MultivariateNormalCholesky.sample_n(n, seed=None, name='sample_n')` {#MultivariateNormalCholesky.sample_n} Sample `n` observations from the Multivariate Normal Distributions. 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 c5c22bb471..6120886ce4 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 @@ -272,7 +272,31 @@ The PDF of observations in `x` under these Student's t distribution(s). - - - -#### `tf.contrib.distributions.StudentT.sample(n, seed=None, name='sample')` {#StudentT.sample} +#### `tf.contrib.distributions.StudentT.sample(sample_shape=(), seed=None, name='sample')` {#StudentT.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.StudentT.sample_n(n, seed=None, name='sample_n')` {#StudentT.sample_n} Sample `n` observations from the Student t Distributions. diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.contrib.distributions.TransformedDistribution.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.contrib.distributions.TransformedDistribution.md index 589801ca51..5d11a754be 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.contrib.distributions.TransformedDistribution.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.contrib.distributions.TransformedDistribution.md @@ -281,7 +281,31 @@ The prob of observations in `y`. - - - -#### `tf.contrib.distributions.TransformedDistribution.sample(n, seed=None, name='sample')` {#TransformedDistribution.sample} +#### `tf.contrib.distributions.TransformedDistribution.sample(sample_shape=(), seed=None, name='sample')` {#TransformedDistribution.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.TransformedDistribution.sample_n(n, seed=None, name='sample_n')` {#TransformedDistribution.sample_n} Sample `n` observations. 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 e0dcfe5e27..a7e027473c 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 @@ -122,7 +122,8 @@ Log-probability of class `k`. ##### Args: -* <b>`k`</b>: `int32` or `int64` Tensor with shape = `self.batch_shape()`. +* <b>`k`</b>: `int32` or `int64` Tensor. Must be broadcastable with a `batch_shape` + `Tensor`. * <b>`name`</b>: A name for this operation (optional). ##### Returns: @@ -188,7 +189,7 @@ Probability of class `k`. ##### Args: -* <b>`k`</b>: `int32` or `int64` Tensor with shape = `self.batch_shape()`. +* <b>`k`</b>: `int32` or `int64` Tensor. Must be broadcastable with logits. * <b>`name`</b>: A name for this operation (optional). ##### Returns: @@ -198,7 +199,31 @@ Probability of class `k`. - - - -#### `tf.contrib.distributions.Categorical.sample(n, seed=None, name='sample')` {#Categorical.sample} +#### `tf.contrib.distributions.Categorical.sample(sample_shape=(), seed=None, name='sample')` {#Categorical.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Categorical.sample_n(n, seed=None, name='sample_n')` {#Categorical.sample_n} Sample `n` observations from the Categorical 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 8c71f58aa1..b1c9f857e6 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 @@ -302,7 +302,31 @@ Pdf of observations in `x` under these Gamma distribution(s). - - - -#### `tf.contrib.distributions.Chi2.sample(n, seed=None, name='sample')` {#Chi2.sample} +#### `tf.contrib.distributions.Chi2.sample(sample_shape=(), seed=None, name='sample')` {#Chi2.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Chi2.sample_n(n, seed=None, name='sample_n')` {#Chi2.sample_n} Draws `n` samples from the Gamma distribution(s). 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 b4e68fc33a..dc74a688ea 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 @@ -237,7 +237,31 @@ The PDF of observations in `x` under these Uniform distribution(s). - - - -#### `tf.contrib.distributions.Uniform.sample(n, seed=None, name='sample')` {#Uniform.sample} +#### `tf.contrib.distributions.Uniform.sample(sample_shape=(), seed=None, name='sample')` {#Uniform.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Uniform.sample_n(n, seed=None, name='sample_n')` {#Uniform.sample_n} Sample `n` observations from the Uniform Distributions. 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 c844b5b122..56a82357bc 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 @@ -332,7 +332,31 @@ probability includes a combinatorial coefficient. - - - -#### `tf.contrib.distributions.DirichletMultinomial.sample(n, seed=None, name='sample')` {#DirichletMultinomial.sample} +#### `tf.contrib.distributions.DirichletMultinomial.sample(sample_shape=(), seed=None, name='sample')` {#DirichletMultinomial.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.DirichletMultinomial.sample_n(n, seed=None, name='sample_n')` {#DirichletMultinomial.sample_n} Generate `n` samples. 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 63302451fb..565a007f2e 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 @@ -302,7 +302,31 @@ Pdf of observations in `x` under these Gamma distribution(s). - - - -#### `tf.contrib.distributions.Exponential.sample(n, seed=None, name=None)` {#Exponential.sample} +#### `tf.contrib.distributions.Exponential.sample(sample_shape=(), seed=None, name='sample')` {#Exponential.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Exponential.sample_n(n, seed=None, name='sample_n')` {#Exponential.sample_n} Sample `n` observations from the Exponential Distributions. 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 55d4c391a0..8d03608c93 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 @@ -319,7 +319,31 @@ Pdf of observations in `x` under these Gamma distribution(s). - - - -#### `tf.contrib.distributions.Gamma.sample(n, seed=None, name='sample')` {#Gamma.sample} +#### `tf.contrib.distributions.Gamma.sample(sample_shape=(), seed=None, name='sample')` {#Gamma.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Gamma.sample_n(n, seed=None, name='sample_n')` {#Gamma.sample_n} Draws `n` samples from the Gamma distribution(s). diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.InverseGamma.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.InverseGamma.md index f3acefc288..68e28c3253 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.InverseGamma.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.contrib.distributions.InverseGamma.md @@ -329,7 +329,31 @@ Pdf of observations in `x` under these Gamma distribution(s). - - - -#### `tf.contrib.distributions.InverseGamma.sample(n, seed=None, name='sample')` {#InverseGamma.sample} +#### `tf.contrib.distributions.InverseGamma.sample(sample_shape=(), seed=None, name='sample')` {#InverseGamma.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.InverseGamma.sample_n(n, seed=None, name='sample_n')` {#InverseGamma.sample_n} Draws `n` samples from these InverseGamma distribution(s). diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.contrib.distributions.Beta.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.contrib.distributions.Beta.md index 50291c4792..d866384032 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.contrib.distributions.Beta.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.contrib.distributions.Beta.md @@ -319,7 +319,31 @@ The probability mass function. - - - -#### `tf.contrib.distributions.Beta.sample(n, seed=None, name='sample')` {#Beta.sample} +#### `tf.contrib.distributions.Beta.sample(sample_shape=(), seed=None, name='sample')` {#Beta.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Beta.sample_n(n, seed=None, name='sample_n')` {#Beta.sample_n} Sample `n` observations from the Beta Distributions. diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.contrib.distributions.Laplace.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.contrib.distributions.Laplace.md index 89179d0e1a..1e1953caa3 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.contrib.distributions.Laplace.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard6/tf.contrib.distributions.Laplace.md @@ -274,7 +274,31 @@ The prob of observations in `x` under the Laplace distribution(s). - - - -#### `tf.contrib.distributions.Laplace.sample(n, seed=None, name='sample')` {#Laplace.sample} +#### `tf.contrib.distributions.Laplace.sample(sample_shape=(), seed=None, name='sample')` {#Laplace.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Laplace.sample_n(n, seed=None, name='sample_n')` {#Laplace.sample_n} Sample `n` observations from the Laplace Distributions. diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.MultivariateNormalFull.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.MultivariateNormalFull.md index 535e8ca99e..706654c65d 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.MultivariateNormalFull.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard7/tf.contrib.distributions.MultivariateNormalFull.md @@ -267,7 +267,31 @@ OR - - - -#### `tf.contrib.distributions.MultivariateNormalFull.sample(n, seed=None, name='sample')` {#MultivariateNormalFull.sample} +#### `tf.contrib.distributions.MultivariateNormalFull.sample(sample_shape=(), seed=None, name='sample')` {#MultivariateNormalFull.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.MultivariateNormalFull.sample_n(n, seed=None, name='sample_n')` {#MultivariateNormalFull.sample_n} Sample `n` observations from the Multivariate Normal Distributions. 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 f0dc36e771..7370b72a8c 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 @@ -298,7 +298,31 @@ The PDF of observations in `x` under these Normal distribution(s). - - - -#### `tf.contrib.distributions.Normal.sample(n, seed=None, name='sample')` {#Normal.sample} +#### `tf.contrib.distributions.Normal.sample(sample_shape=(), seed=None, name='sample')` {#Normal.sample} + +Generate samples of the specified shape for each batched distribution. + +Note that a call to `sample()` without arguments will generate a single +sample per batched distribution. + +##### Args: + + +* <b>`sample_shape`</b>: `int32` `Tensor` or tuple or list. Shape of the generated + samples. +* <b>`seed`</b>: Python integer seed for RNG +* <b>`name`</b>: name to give to the op. + +##### Returns: + + +* <b>`samples`</b>: a `Tensor` of dtype `self.dtype` and shape + `sample_shape + self.batch_shape + self.event_shape`. + + +- - - + +#### `tf.contrib.distributions.Normal.sample_n(n, seed=None, name='sample_n')` {#Normal.sample_n} Sample `n` observations from the Normal Distributions. |