Skip to content

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

@allenlittlestar

Description

@allenlittlestar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions