我下载了你提供的裁剪好的resnet50,但是要怎么加载呢?
import torch
checkpoint = torch.load('/home/fwq/soft-filter-pruningResNet50_pruned/ResNet50_pruned_rate0.3.pt')
显示错误:SourceChangeWarning: source code of class 'torch.nn.modules.linear.Linear' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
我下载了你提供的裁剪好的resnet50,但是要怎么加载呢? import torch checkpoint = torch.load('/home/fwq/soft-filter-pruningResNet50_pruned/ResNet50_pruned_rate0.3.pt') 显示错误:SourceChangeWarning: source code of class 'torch.nn.modules.linear.Linear' has changed. you can retrieve the original source code by accessing the object's source attribute or set
torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning)