https://blog.csdn.net/wuliBob/article/details/104119616
Examples::
>>>import torch.nn.functional as F
>>> input = torch.randn(3, 5, requires_grad=True)
>>> target = torch.randint(5, (3,), dtype=torch.int64) #其中(3,)是輸出的shape
>>> loss = F.cross_entropy(input, target)
>>> loss.backward()