You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import numpy as np
import pydensecrf.densecrf as dcrf
d = dcrf.DenseCRF(80, 2)
U = np.random.random(size=(2, 80))
d.setUnaryEnergy(U)
Traceback (most recent call last):
File "", line 1, in
d.setUnaryEnergy(U)
File "pydensecrf/densecrf.pyx", line 80, in pydensecrf.densecrf.DenseCRF.setUn
aryEnergy (pydensecrf/densecrf.cpp:3370)
ValueError: Buffer dtype mismatch, expected 'float' but got 'double'
The text was updated successfully, but these errors were encountered:
People had this error before (#49) and it's a user error. I think the error is pretty clear: you should pass a float, but you're passing a double. Fix by doing U = U.astype(np.float32). I'll add a note to the FAQ in the README.
Try below code and get ValueError.
The text was updated successfully, but these errors were encountered: