Oh, I fix the problem. According to the documentation, the size of the input of function torch.nn.functional.cross_entropy
should be (N,C,H,W). CHANNEL FIRST
2 Likes
Oh, I fix the problem. According to the documentation, the size of the input of function torch.nn.functional.cross_entropy
should be (N,C,H,W). CHANNEL FIRST