UltrasondConfienceMap icon indicating copy to clipboard operation
UltrasondConfienceMap copied to clipboard

Errors when running demo_confidence_map.py with solver_mode='gpu'

Open LeeKeyu opened this issue 4 years ago • 1 comments

Hi,

Thank you for sharing the code. I tried to run your python script "demo_confidence_map.py", and it worked well when mode=='bf' and 'cg'. However, when I turn the mode to be 'gpu', it throws this error: File "/home/likeyu/lab/UltrasondConfienceMap/python/confidence_map.py", line 387, in confidence_map X = np.array([_clean_labels_ar(Xline, labels, copy=True).reshape(dims) for Xline in X]) File "/home/likeyu/lab/UltrasondConfienceMap/python/confidence_map.py", line 387, in X = np.array([_clean_labels_ar(Xline, labels, copy=True).reshape(dims) for Xline in X]) File "/home/likeyu/lab/UltrasondConfienceMap/python/confidence_map.py", line 127, in _clean_labels_ar X = X.astype(labels.dtype) AttributeError: 'Vector' object has no attribute 'astype'

When I change the line "X = X.astype(labels.dtype)" in the function _clean_labels_ar to be "X = np.array(X, dtype=labels.dtype)", it throws another error: ...... File "/home/likeyu/lab/UltrasondConfienceMap/python/confidence_map.py", line 128, in _clean_labels_ar X = np.array(X, dtype=labels.dtype) ValueError: setting an array element with a sequence.

I have not figured out what caused the problem. May I ask for your help? Thank you very much in advance!

Best regards, Keyu

LeeKeyu avatar Jun 16 '20 14:06 LeeKeyu

@LeeKeyu Could you solve this issue? I am having the similar issues with GPU mode

deepakraina99 avatar Jul 02 '22 17:07 deepakraina99