pytorch加载.pth文件

pytorch加载.pth文件

1.创建一个新的python文件
2.键入代码,运行。
注意:
profile后面为所要查看的pth文件地址。
代码:
import torch
pthfile = r’D:\deep reinforcemnt learning\PRUNING FILTERS FOR EFFICIENT CONVNETS\Pruning_filters_for_efficient_convnets-master\trained_models\check_point.pth’
net = torch.load(pthfile)
print(net)

你可能感兴趣的:(pytorch,python)