2020
10-08
10-08
可视化pytorch 模型中不同BN层的running mean曲线实例
加载模型字典逐一判断每一层,如果该层是bn的runningmean,就取出参数并取平均作为该层的代表对保存的每个BN层的数值进行曲线可视化fromfunctoolsimportpartialimportpickleimporttorchimportmatplotlib.pyplotaspltpth_path='checkpoint.pth'pickle.load=partial(pickle.load,encoding="latin1")pickle.Unpickler=partial(pickle.Unpickler,encoding="latin1")pretrained_dict=torch.load(pth_path,map_loc...
继续阅读 >