def METHOD_NAME(self, input_char, onehot_dim=38):
    input_char = input_char.unsqueeze(1)
    batch_size = input_char.size(0)
    one_hot = torch.FloatTensor(batch_size, onehot_dim).zero_().to(device)
    one_hot = one_hot.scatter_(1, input_char, 1)
    return one_hot