jacinle.nd.indexing#
Functions
|
Gather |
|
Convert a label array to one-hot array. |
|
Convert a label array to one-hot array. |
Functions
- index_select_batch(data, indices)[source]#
Gather
indices
as batch indices fromdata
, which can either be typical nd array or a list of nd array.
- one_hot(label, nr_classes, dtype='float32')[source]#
Convert a label array to one-hot array. This function works for either 0d (scalar) or 1d (vector) label array. If you want to convert higher dimensional label array, use
one_hot_nd()
instead.