Reputation: 407
I guess tf.multinomial
does sampling based on softmax([[-1,1]])
. If you have some ideas, please, tell me.
Upvotes: 1
Views: 161
Reputation: 24581
That's because tf.multinomial
takes log-probabilities as its first argument.
From the docs:
logits
: 2-D Tensor with shape[batch_size, num_classes]
. Each slice[i, :]
represents the unnormalized log-probabilities for all classes.
Upvotes: 1