pytorch中.weight.data与.weight .weight.data:得到的是一个Tensor的张量(向量),不可训练的类型 .weight:得到的是一个parameter的变量,可以计算梯度的 查看两个方法的类型 pytorch中.weight.data与.weight的区别 pytorch中.weight.data与.weight的区别 查看两个方法的值 pytorch中.weight.data与.weight的区别 pytorch中.weight.data与.weight的区别