MisaOgura / flashtorch

Visualization toolkit for neural networks in PyTorch! Demo -->
https://youtu.be/18Iw4qYqfPo
MIT License
735 stars 87 forks source link

When I test my demo.jpg[BUG] #36

Open cymqqqq opened 4 years ago

cymqqqq commented 4 years ago

AttributeError Traceback (most recent call last)

in () 4 input_=apply_transforms(image) 5 target_class=24 ----> 6 backprop.visualize(input,target_class,guided=True) 1 frames /usr/local/lib/python3.6/dist-packages/flashtorch/saliency/backprop.py in calculate_gradients(self, input_, target_class, take_max, guided, use_gpu) 84 self.model.zero_grad() 85 ---> 86 self.gradients = torch.zeros(input_.shape) 87 88 # Get a raw prediction value (logit) from the last linear layer AttributeError: 'function' object has no attribute 'shape' how to fix it?