Method OneHot
OneHot(TensorInt, TensorInt, int, int, int, int)
Generates a one-hot tensor with a given depth
, indices
and on and off values.
Declaration
public virtual void OneHot(TensorInt X, TensorInt O, int axis, int depth, int offValue, int onValue)
Parameters
Type | Name | Description |
---|---|---|
TensorInt | X | |
TensorInt | O | The output tensor to be computed and filled. |
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. |
Implements
OneHot(TensorInt, TensorFloat, int, int, float, float)
Generates a one-hot tensor with a given depth
, indices
and on and off values.
Declaration
public virtual void OneHot(TensorInt X, TensorFloat O, int axis, int depth, float offValue, float onValue)
Parameters
Type | Name | Description |
---|---|---|
TensorInt | X | |
TensorFloat | O | The output tensor to be computed and filled. |
int | axis | The axis along which the operation adds the one-hot representation. |
int | depth | The depth of the one-hot tensor. |
float | offValue | The value to use for an off element. |
float | onValue | The value to use for an on element. |