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

Bad shape for unary energy #117

Open
anarnold2 opened this issue Jun 18, 2022 · 1 comment
Open

Bad shape for unary energy #117

anarnold2 opened this issue Jun 18, 2022 · 1 comment

Comments

@anarnold2
Copy link

Hi,

I got the same issue now but somehow my code worked the day before. Did you do an update on your library?

This is the error, I got.

 25         U = unary_from_softmax(processed_prediction)
 26         U = np.ascontiguousarray(U) # necessary since the library pydensecrf is using a cython wrapper DEBUg

---> 27 dcrf_obj.setUnaryEnergy(U)
28
29 #pairwise potentials: color-independent -> only on feature location

pydensecrf/densecrf.pyx in pydensecrf.densecrf.DenseCRF.setUnaryEnergy()

ValueError: Bad shape for unary energy (Need (2, 1152), got (2, 147456))

@anarnold2
Copy link
Author

Ok my bad, I had an issue in my code!

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