s4nyam / gradcam-yolo

Paper https://arxiv.org/pdf/2306.06071.pdf Analysing how adversarial attacks aaffect YOLO Object Detection and visualising GradCAM
10 stars 4 forks source link

call loss function problem #1

Closed TanYuzhen closed 1 year ago

TanYuzhen commented 1 year ago

However,when I run the code,it always produces the error :       the x_adv.grad is None

       But the correct thing should be not None.Can you help me to solve the problem?        thumbnail_image

       And,I read your code,finding that you didn't use the function forward in the class pgd ,I'm not sure whether I'm wrong thumbnail_image2

      Thanks a lot!

s4nyam commented 1 year ago

Hi @TanYuzhen I have tried to resolve the problem in this notebook. Can you please use this google colab for reference. https://colab.research.google.com/drive/1X6Y1CGYlklQ3lhdZblTfSYlLqNNVY4Gj?usp=sharing

s4nyam commented 1 year ago

The running google colab notebook was provided.