Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when I run this code for classification without token-label, it has an error #3

Open
MaltoseFlower opened this issue Apr 5, 2022 · 0 comments

Comments

@MaltoseFlower
Copy link

details for this error
Traceback (most recent call last):
File "main.py", line 964, in
main()
File "main.py", line 678, in main
optimizers=optimizers)
File "main.py", line 798, in train_one_epoch
loss = loss_fn(output, target)
File "/mnt/cephfs/home/x/anaconda3/envs/unet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/mnt/cephfs/home/x/anaconda3/envs/unet/lib/python3.7/site-packages/timm/loss/cross_entropy.py", line 35, in forward
loss = torch.sum(-target * F.log_softmax(x, dim=-1), dim=-1)
File "/mnt/cephfs/home/x/anaconda3/envs/unet/lib/python3.7/site-packages/apex/amp/wrap.py", line 28, in wrapper
return orig_fn(*new_args, **kwargs)
File "/mnt/cephfs/home/x/anaconda3/envs/unet/lib/python3.7/site-packages/torch/nn/functional.py", line 1672, in log_softmax
ret = input.log_softmax(dim)
AttributeError: 'tuple' object has no attribute 'log_softmax'

can u help me ? thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant