for name,param in my_cnn.named_parameters():
print('层:',name,param.size())
print('权值梯度',param.grad)
print('权值',param)
放在backward()后面
for name,param in my_cnn.named_parameters():
print('层:',name,param.size())
print('权值梯度',param.grad)
print('权值',param)
放在backward()后面