Open 1byxero opened 4 years ago
Also, I just tried this on node of university cluster and I did not need to make the change I mentioned in the above comment
hey thanks for the help. You saved me some time !!!
thanks!
thanks a lot
邮件已查收,我会尽快回复您!
Thanks a lot. This issue saved me some time!
邮件已查收,我会尽快回复您!
I was getting above error when doing
Prepare NYU Depth V2 test set
step. The error trace was as follows when executing the commandpython extract_official_train_test_set_from_mat.py nyu_depth_v2_labeled.mat splits.mat ../../dataset/nyu_depth_v2/official_splits/
Traceback (most recent call last): File "extract_official_train_test_set_from_mat.py", line 87, in <module> scenes = [u''.join(chr(c) for c in h5_file[obj_ref]) for obj_ref in h5_file['sceneTypes'][0]] File "extract_official_train_test_set_from_mat.py", line 87, in <listcomp> scenes = [u''.join(chr(c) for c in h5_file[obj_ref]) for obj_ref in h5_file['sceneTypes'][0]] File "extract_official_train_test_set_from_mat.py", line 87, in <genexpr> scenes = [u''.join(chr(c) for c in h5_file[obj_ref]) for obj_ref in h5_file['sceneTypes'][0]] TypeError: only integer scalar arrays can be converted to a scalar index
After debugging, I realized that following line was the culprit
scenes = [u''.join(chr(c) for c in h5_file[obj_ref]) for obj_ref in h5_file['sceneTypes'][0]]
The issue was variable
c
was actually an array of single item and hence the above error. To solve it I replaced the line withscenes = [u''.join(chr(c[0]) for c in h5_file[obj_ref]) for obj_ref in h5_file['sceneTypes'][0]]
Things worked out after that, I checked if images generated looked ok, which they did.
I just wanted to confirm if doing this was ok
Nice, brother!
邮件已查收,我会尽快回复您!
Thank you bro! It works!
邮件已查收,我会尽快回复您!
I was getting above error when doing
Prepare NYU Depth V2 test set
step. The error trace was as follows when executing the commandpython extract_official_train_test_set_from_mat.py nyu_depth_v2_labeled.mat splits.mat ../../dataset/nyu_depth_v2/official_splits/
After debugging, I realized that following line was the culprit
scenes = [u''.join(chr(c) for c in h5_file[obj_ref]) for obj_ref in h5_file['sceneTypes'][0]]
The issue was variable
c
was actually an array of single item and hence the above error. To solve it I replaced the line withscenes = [u''.join(chr(c[0]) for c in h5_file[obj_ref]) for obj_ref in h5_file['sceneTypes'][0]]
Things worked out after that, I checked if images generated looked ok, which they did.
I just wanted to confirm if doing this was ok