operation
Modifier and Type | Method and Description |
---|---|
Output<V> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <T extends Number,U extends Number> |
create(Scope scope,
Operand<T> logits,
Operand<Integer> numSamples,
Operand<U> seed)
Factory method to create a class wrapping a new StatelessMultinomial operation using default output types.
|
static <V extends Number,T extends Number,U extends Number> |
create(Scope scope,
Operand<T> logits,
Operand<Integer> numSamples,
Operand<U> seed,
Class<V> outputDtype)
Factory method to create a class wrapping a new StatelessMultinomial operation.
|
Output<V> |
output()
2-D Tensor with shape `[batch_size, num_samples]`.
|
equals, hashCode, op, toString
public static <V extends Number,T extends Number,U extends Number> StatelessMultinomial<V> create(Scope scope, Operand<T> logits, Operand<Integer> numSamples, Operand<U> seed, Class<V> outputDtype)
scope
- current 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.seed
- 2 seeds (shape [2]).outputDtype
- public static <T extends Number,U extends Number> StatelessMultinomial<Long> create(Scope scope, Operand<T> logits, Operand<Integer> numSamples, Operand<U> seed)
scope
- current 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.seed
- 2 seeds (shape [2]).public Output<V> output()
public Output<V> asOutput()
Operand
Inputs 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<V extends Number>
OperationBuilder.addInput(Output)
Copyright © 2022. All rights reserved.