zhoubolei / CAM

Class Activation Mapping
http://cnnlocalization.csail.mit.edu/
MIT License
1.85k stars 467 forks source link

AttributeError: 'tuple' object has no attribute 'softmax' #45

Open allenlittlestar opened 2 years ago

allenlittlestar commented 2 years ago

Traceback (most recent call last): File "CAM3.py", line 69, in h_x = F.softmax(logit, dim=1).data.squeeze() File "/home/omnisky/anaconda2/envs/swin/lib/python3.7/site-packages/torch/nn/functional.py", line 1512, in softmax ret = input.softmax(dim) AttributeError: 'tuple' object has no attribute 'softmax'

When I put pytorch_ CAM. Py encountered the above problems when it was used in my own model. Do you know how to solve them? Thank you very much and look forward to your reply@Bolei Zhou