I found an issue when running the python test_deepfool code. Could be my machine, but I this is what I ran into with a fresh pytorch 0.1.12
The test file doesn't work right away for me, I had to change a couple indexing lines that were giving me trouble.
#Line 81 in deepfool.py should be
fs = net.forward(x)
#line 53 in test_deepfool.py then is this
plt.imshow(np.clip(tf(pert_image.cpu()[0]), 0, 255))
For me this fixed a 5D variable that was being passed into resnet as input, instead of a 4D like it wants.
I found an issue when running the python test_deepfool code. Could be my machine, but I this is what I ran into with a fresh pytorch 0.1.12 The test file doesn't work right away for me, I had to change a couple indexing lines that were giving me trouble.
For me this fixed a 5D variable that was being passed into resnet as input, instead of a 4D like it wants.