Method OneHot
OneHot(TensorInt, int, int, int, int)
Generates a one-hot tensor with a given depth
, indices
and on and off values.
Declaration
public TensorInt OneHot(TensorInt indices, int axis, int depth, int offValue, int onValue)
Parameters
Type | Name | Description |
---|---|---|
TensorInt | indices | The indices input tensor. |
int | axis | The axis along which the operation adds the one-hot representation. |
int | depth | The depth of the one-hot tensor. |
int | offValue | The value to use for an off element. |
int | onValue | The value to use for an on element. |
Returns
Type | Description |
---|---|
TensorInt | The computed output tensor. |