ClikaRT::ops::one_hot
function
one_hot()
Expands an integer index tensor into a trailing one-hot dimension.
Parameters
indices: integer indices, any shape; each value must lie in[0, num_classes).num_classes: the one-hot width.
Throws
ClikaRT::Error: whenindicesis not an integer dtype or a value is out of range (code_name()carries the reason).
Returns: indices.shape ++ [num_classes], Int64.
Declared in ClikaRT/compute/ops.h, line 2084