GithubHelp home page GithubHelp logo

Issue with resnet18 model about captum HOT 2 CLOSED

cjbarb7 avatar cjbarb7 commented on June 15, 2024
Issue with resnet18 model

from captum.

Comments (2)

cjbarb7 avatar cjbarb7 commented on June 15, 2024 2

Sorry for the late reply. Thanks for the tip, yea something is wrong with the model.

from captum.

vivekmig avatar vivekmig commented on June 15, 2024

Hi @cjbarb7 , this issue sounds specific to your model, so we'll likely need more information to debug this. From the error given, it seems like it could be related to PyTorch versions or the AvgPool2d object not being created appropriately, since the divisor_override attribute seems to be set by the constructor of AvgPool2d in recent versions of PyTorch. Can you first double-check that just running a forward and backward pass of your model work without any errors? For instance, for a single input tensor, this would be something like:

# Forward pass
outputs = model(input)

# Backward pass
# Note if you have multiple outputs per input, 
# you will have to select one column of outputs first.
torch.autograd.grad(torch.unbind(outputs), input)

If either gives you the same error, there may be something with your model that needs to be fixed. If both of these work fine, we can look into this further with some more details about your model and the full stack trace. Thanks!

from captum.

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.