Closed iBrain-007 closed 3 years ago
Hey,
You have to hook correct layers. If your model does not follow the assumed architecture (features/classifier), you have to make minor modifications in the code. Have a look at a couple of related opened issues before.
I got an error when I run
guided_backprop.py
on my own model:guided_grads = GBP.generate_gradients(preprocessed_img, target_class) gradients_as_array = self.gradients.data.cpu().numpy()[0]
And the terminal outputs the following error": AttributeError: 'NoneType' object has no attribute 'data' Are there any suggestions? Thanks advance.