Reputation: 167
I have a tensor of size [3, 15, 136]
, where:
3 is batch size
15 - sequence length
and136 is tokens
I want to one-hot my tensor using the probabilities in the tokens
dimension (136). To do so I want to extract the tokens dimension for each letter in sequence length and put 1
to the largest possibility and mark all other tokens as 0
.
Upvotes: 3
Views: 2413