Open ashnair1 opened 4 years ago
I had a question about how one hot encoding is done.
Why is it done like this:
true_1_hot = torch.eye(num_classes + 1)[true.squeeze(1)]
when it could be implemented like this
true_1_hot = F.one_hot(true, num_classes + 1)
Am I missing something or was F.one_hot added later?
I had a question about how one hot encoding is done.
Why is it done like this:
when it could be implemented like this
Am I missing something or was F.one_hot added later?