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

在losses.py里 max_pos, armmax_pos = pos.max(0) RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity #23

Open
IsenLwww opened this issue Mar 21, 2024 · 3 comments

Comments

@IsenLwww
Copy link

在losses.py里 max_pos, armmax_pos = pos.max(0)
RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity
刚开始以为是batch_size的问题,以为解决了,但是后续的Epoch还是会报错,到底是哪里的问题呢

@IsenLwww
Copy link
Author

有时候可能会没有这个报错,有些不明白,望好心人解答

@IsenLwww
Copy link
Author

发现positive_indices为0的时候会出问题

@zlx913
Copy link

zlx913 commented Jul 31, 2024

在 losses.py 里 max_pos, armmax_pos = pos.max(0) RuntimeError: cannot perform reduction function max on tensor without the elements because the operation does not have an identity 刚开始以为是batch_size的问题,以为解决了,但是后续的Epoch还是会报错,到底是哪里的问题呢

你好,请问你解决这个问题了吗,我也遇到几乎一样的问题。。。

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

2 participants