PaDiM: a Patch Distribution Modeling Framework for Anomaly Detection and Localization 代码记录
model.to(device)model.eval()#setmodel'sintermediateoutputsoutputs=[]defhook(module,input,output):outputs.append(output)model.layer1[-1].register_forward_hook(hook)model.layer2[-1].register_forward_hoo