Skip to content

cam = torch.nansum(weight * activation.squeeze(0), dim=0) # type: ignore[union-attr] #148

Answered by frgfm
hit-dyl asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @hit-dyl 👋

Thanks for reporting this! However this looks more like a bug report (there is a Github issue template for this), please try to use those when appropriate 🙏 The template walks you through how to provide required information for me to help you debug this 😅

That being said, seeing the error that you get, the problem doesn't come from this project directly. Which version of PyTorch are you using?

Your error shows that you are using an older version of PyTorch, as torch.nansum appeared in release 1.7.0. If that's the case, simply upgrade your pytorch version and you'll be good to go :)
On my end, I'll update the torch requirement on TorchCAM, because the current one is >=1.5.1 w…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hit-dyl
Comment options

Answer selected by frgfm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working topic: build
2 participants