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

bug in model.predict() with s and s.item() #63

Open
JuliaGast opened this issue May 23, 2022 · 1 comment
Open

bug in model.predict() with s and s.item() #63

JuliaGast opened this issue May 23, 2022 · 1 comment

Comments

@JuliaGast
Copy link

This (l.232 ff):

            for s, prob_s in zip(subjects, prob_subjects):
                if s in s_done:
                    continue
                else:
                    s_done.add(s)

and this:

            for o, prob_o in zip(objects, prob_objects):
                if o in o_done:
                    continue
                else:
                    o_done.add(o)

does not return a true for the if-statement. because e.g., tensor(53) is not equal to tensor(53) - these are different hashs.
Instead, you'd have to modify it to

            for s, prob_s in zip(subjects, prob_subjects):
                if s.item() in s_done:
                    continue
                else:
                    s_done.add(s.item())

(and same for objects)

@woojeongjin
Copy link
Contributor

Thanks for the bug! But it does not change the inference.

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