Git Product home page Git Product logo

Comments (8)

Caoliangjie avatar Caoliangjie commented on May 17, 2024 5

Resnet model hasn't .features.
How I can use it using your code?

Hi,fahmanali,I change the basic network from vgg19 to renset50 in the author’s basic code, there‘re really some differences between vgg19 and resnet50. You can fork from my repository if my code can help you.
My repository can be seen:https://github.com/Caoliangjie/pytorch-gradcam-resnet50

from pytorch-grad-cam.

loveunk avatar loveunk commented on May 17, 2024 2

@Adarsh-Shrivastava-001
I have changed the original repo a little bit, and both vgg and resnet are supported now: https://github.com/loveunk/pytorch-grad-cam

from pytorch-grad-cam.

anonymous530 avatar anonymous530 commented on May 17, 2024

Similar to the question above~
If I trained a pytorch model without attribute features. How can I applied this method to my trained model?

from pytorch-grad-cam.

anonymous530 avatar anonymous530 commented on May 17, 2024

Resnet model hasn't .features.
How I can use it using your code?

Maybe you can add the attribute features to the training code and train the Resnet model from scratch?

from pytorch-grad-cam.

Adarsh-Shrivastava-001 avatar Adarsh-Shrivastava-001 commented on May 17, 2024

I want to use the same code for resnet

But unable to do so

pls help

from pytorch-grad-cam.

jdariasl avatar jdariasl commented on May 17, 2024

@loveunk @jacobgil How do you guys define the target ? I understand the structure based on 'features'/'claissfier' or 'pre_features', 'features', 'classifier', but I'm still confused with the target: ['35'] for VGG and ['2'] for Resnet.

Thank you.

from pytorch-grad-cam.

frgfm avatar frgfm commented on May 17, 2024

@Adarsh-Shrivastava-001 @jacobgil if you're still having troubles, I'm maintaining a repo with many CAM method implementations: https://github.com/frgfm/torch-cam. By default, the target layer is resolved automatically (the last one to produce tensors keeping the spatial dimensions), but you can specify any layer you wish.

I'd be glad to get some extra feedback!

from pytorch-grad-cam.

jacobgil avatar jacobgil commented on May 17, 2024

Hi all,
In the updated repo there is support for all torchvision models, and also Vision Transformers.
Check the Readme :-)

from pytorch-grad-cam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.