TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-15

tensorplay.nn.functional.one_hot

tensorplay.nn.functional.one_hot(tensor, num_classes=-1) → LongTensor[source]

Returns long tensor shaped tensor.shape + (num_classes,) with a 1 at

On this page

Ask DeepWiki