1. Pytorch中只导入部分层权重的方法,如下
[pytorch] TypeError cannot assign torch.FloatTensor as parameter weight_nc101100的博客-CSDN博客
2. 把tensor赋值给神经网络的权重矩阵,可参考:
[pytorch] TypeError cannot assign torch.FloatTensor as parameter weight_nc101100的博客-CSDN博客
2024-01-20 21:01:28
[pytorch] TypeError cannot assign torch.FloatTensor as parameter weight_nc101100的博客-CSDN博客
2. 把tensor赋值给神经网络的权重矩阵,可参考:
[pytorch] TypeError cannot assign torch.FloatTensor as parameter weight_nc101100的博客-CSDN博客
下一篇:pytorch-模型保存和加载