| Modifier and Type | Class and Description |
|---|---|
static class |
Multinomial.Options
Optional attributes for
Multinomial |
operation| Modifier and Type | Method and Description |
|---|---|
Output<U> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <U extends Number,T extends Number> |
create(Scope scope,
Operand<T> logits,
Operand<Integer> numSamples,
Class<U> outputDtype,
Multinomial.Options... options)
Factory method to create a class to wrap a new Multinomial operation to the graph.
|
static <T extends Number> |
create(Scope scope,
Operand<T> logits,
Operand<Integer> numSamples,
Multinomial.Options... options)
Factory method to create a class to wrap a new Multinomial operation to the graph, using default output types.
|
Output<U> |
output()
2-D Tensor with shape `[batch_size, num_samples]`.
|
static Multinomial.Options |
seed(Long seed) |
static Multinomial.Options |
seed2(Long seed2) |
equals, hashCode, toStringpublic static <U extends Number,T extends Number> Multinomial<U> create(Scope scope, Operand<T> logits, Operand<Integer> numSamples, Class<U> outputDtype, Multinomial.Options... options)
scope - current graph scopelogits - 2-D Tensor with shape `[batch_size, num_classes]`. Each slice `[i, :]`
represents the unnormalized log probabilities for all classes.numSamples - 0-D. Number of independent samples to draw for each row slice.outputDtype - options - carries optional attributes valuespublic static <T extends Number> Multinomial<Long> create(Scope scope, Operand<T> logits, Operand<Integer> numSamples, Multinomial.Options... options)
scope - current graph scopelogits - 2-D Tensor with shape `[batch_size, num_classes]`. Each slice `[i, :]`
represents the unnormalized log probabilities for all classes.numSamples - 0-D. Number of independent samples to draw for each row slice.options - carries optional attributes valuespublic static Multinomial.Options seed(Long seed)
seed - If either seed or seed2 is set to be non-zero, the internal random number
generator is seeded by the given seed. Otherwise, a random seed is used.public static Multinomial.Options seed2(Long seed2)
seed2 - A second seed to avoid seed collision.public Output<U> output()
public Output<U> asOutput()
OperandInputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.
asOutput in interface Operand<U extends Number>OperationBuilder.addInput(Output)Copyright © 2015–2019. All rights reserved.