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

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

Open
LeeKeyu opened this issue Jun 16, 2020 · 1 comment
Open

Comments

@LeeKeyu
Copy link

LeeKeyu commented Jun 16, 2020

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

@deepakraina99
Copy link

deepakraina99 commented Jul 2, 2022

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

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