深度学习——nn.BCELoss(),nn.CrossEntropyLoss(),nn.BCEWithLogitsLoss()
nn.CrossEntropyLoss()A=torch.randn((1,2,3,4))torch.manual_seed(100)B=torch.randint(0,2,(1,3,4))#print(A)#print(B)entropy=torch.nn.CrossEntropyLoss()print(entropy(A,B))A=torch.randn((3,2,3,4))torch.man