import torch
from test01 import Net
model = Net()
model.load_state_dict(torch.load(r"C:\Users\admin\Desktop\test1\w.pkl"))
print(model.fc1.weight)
print('/')
print(model.fc2.weight)
print('/')
print(model.fc3.weight)
读pkl文件,并打印出每行的权重
最新推荐文章于 2024-06-14 21:28:54 发布