I used the line torch.nn.functional.one_hot(targets) which reshaped my target variable to torch.Size([32, 2]) .
確定! 回上一頁