Dear Frank 
Oh,that’s so terrible,I would like to re-post this again and sorry about wasting your time…
>>> import torch
>>> torch.__version__
'1.5.1+cu101'
>>> x = torch.tensor([[-0.3571,  0.1481,  0.1713, -1.2597, -0.7667],
...         [-0.1553, -0.9620,  0.0103,  3.3494,  0.2220],
...         [ 2.1131, -0.2404,  0.4820,  0.3816,  1.9752],
...         [ 1.7232, -0.5064, -0.8151,  0.3720,  0.1470]], requires_grad=True)
>>> z = x.mean()
>>> z.backward()
>>> x.grad
tensor([[0.0500, 0.0500, 0.0500, 0.0500, 0.0500],
       [0.0500, 0.0500, 0.0500, 0.0500, 0.0500],
       [0.0500, 0.0500, 0.0500, 0.0500, 0.0500],
       [0.0500, 0.0500, 0.0500, 0.0500, 0.0500]])


And another one would be :
>>> import torch 
>>> torch.__version__
'1.5.1+cu101'
>>> x = torch.tensor([[-0.3571,  0.1481,  0.1713, -1.2597, -0.7667],
...         [-0.1553, -0.9620,  0.0103,  3.3494,  0.2220],
...         [ 2.1131, -0.2404,  0.4820,  0.3816,  1.9752],
...         [ 1.7232, -0.5064, -0.8151,  0.3720,  0.1470]], requires_grad=True)
>>> z = x.sum()
>>> z.backward()
>>> x.grad
tensor([[1., 1., 1., 1., 1.],
        [1., 1., 1., 1., 1.],
        [1., 1., 1., 1., 1.],
        [1., 1., 1., 1., 1.]])

And once again,Thanks in advance ! !