You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Swapping to MSE loss is not directly intuitive. MSEloss in PyTorch takes labels that are one-hot encoded as default. To do this, I generated a separate variable "y_onehot". It may be helpful to clarify this in a "hint" box or something along with this question.
# one hot encode y
y_onehot = torch.nn.functional.one_hot(y, num_classes=3)
y_onehot = y_onehot.type(torch.float32)
The text was updated successfully, but these errors were encountered:
Swapping to MSE loss is not directly intuitive. MSEloss in PyTorch takes labels that are one-hot encoded as default. To do this, I generated a separate variable "y_onehot". It may be helpful to clarify this in a "hint" box or something along with this question.
The text was updated successfully, but these errors were encountered: