解决运行extract_official_train_test_set_from_mat.py时only integer scalar arrays can be converted to a scalar index问题
Zannnn opened this issue · 3 comments
Zannnn commented
将scenes = [u''.join(chr(c) for c in h5_file[obj_ref]) for obj_ref in h5_file['sceneTypes'][0]]改成scenes = [u''.join(chr(c[0]) for c in h5_file[obj_ref]) for obj_ref in h5_file['sceneTypes'][0]]
fanrz commented
English, plz
WEIIEW97 commented
English, plz
He means when you run the script you probably encounter a problem that shows only integer scalar arrays can be converted to a scalar index
. You can change the code from scenes = [u''.join(chr(c) for c in h5_file[obj_ref]) for obj_ref in h5_file['sceneTypes'][0]]
to scenes = [u''.join(chr(c[0]) for c in h5_file[obj_ref]) for obj_ref in h5_file['sceneTypes'][0]]
(Maybe around line 87)
prayerCCC commented
谢谢兄弟!!!一个上午解决不了终于解决了