#include <random_ops.h>
Draws samples from a multinomial distribution.
Arguments:
[batch_size, num_classes]
. Each slice [i, :]
represents the unnormalized log probabilities for all classes.Optional attributes (see Attrs
):
Returns:
Output
: 2-D Tensor with shape [batch_size, num_samples]
. Each slice [i, :]
contains the drawn class labels with range [0, num_classes)
. Constructors and Destructors | |
---|---|
Multinomial(const ::tensorflow::Scope & scope, ::tensorflow::Input logits, ::tensorflow::Input num_samples) | |
Multinomial(const ::tensorflow::Scope & scope, ::tensorflow::Input logits, ::tensorflow::Input num_samples, const Multinomial::Attrs & attrs) |
Public attributes | |
---|---|
output |
Public functions | |
---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const |
Public static functions | |
---|---|
OutputDtype(DataType x) | |
Seed(int64 x) | |
Seed2(int64 x) |
Structs | |
---|---|
tensorflow::ops::Multinomial::Attrs | Optional attribute setters for Multinomial. |
::tensorflow::Output output
Multinomial( const ::tensorflow::Scope & scope, ::tensorflow::Input logits, ::tensorflow::Input num_samples )
Multinomial( const ::tensorflow::Scope & scope, ::tensorflow::Input logits, ::tensorflow::Input num_samples, const Multinomial::Attrs & attrs )
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Attrs OutputDtype( DataType x )
Attrs Seed( int64 x )
Attrs Seed2( int64 x )
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/multinomial.html