scvi.nn.one_hot

class scvi.nn.one_hot(index, n_cat)[source]

One hot a tensor of categories.

Return type

TensorTensor