Converts batch into a Value object of dtype such that the integer data in batch is interpreted as the indices representing one-hot vectors.
value_one_hot(batch, num_classes, dtype = "auto", device = NULL)
batch | (list of list of int) batch input data of indices |
---|---|
num_classes | (int or list) number of classes or shape of each sample whose trailing axis is one_hot |
dtype | data type to be used ("float32", "float64", or "auto") |
device | instance of DeviceDescriptor |