API symbolsnn
Copy
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 each label position — port of ATen one_hot.
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?
tensorplay.nn.functional.normalize
Performs \(L_p\) normalization over the specified dimension — torch.nn.functional.normalize divides by clamp_min(norm, eps).
tensorplay.nn.functional.pad
Pads tensor. pad values are described starting from the last dimension and moving forward, exactly like torch.nn.functional.pad. Non-constant modes support the last 3 dimensions of a 3D/4D/5D input (torch’s restriction).
