pytorchTutorial
pytorchTutorial copied to clipboard
Using BCELoss
I modified the given code to change the criterion = nn.CrossEntropyLoss() with criterion= BCELoss() but I get a ValueError here as ValueError: Using a target size (torch.Size([4])) that is different to the input size (torch.Size([4, 2])) is deprecated. Please ensure they have the same size. Can someone tell the reason and also provide the solution Please ??