ELEKTRONN/ELEKTRONN2

Index error thrown while predicting using a trained model of unet_3d_lite

Closed this issue · 0 comments

I trained a model using unet_3d_lite. I am using Python 2.7 and my raw file and training file is of shape 100200200 (zxy). The following error is thrown while making a prediction.

IndexError Traceback (most recent call last)
/wholebrain/u/rsaxena/devel/ELEKTRONN2/examples/prediction_helper.py in ()
44 #pred_path = '/wholebrain/u/rsaxena/devel/ELEKTRONN2/elektronn2/prediction_test_raw/pred_unet_result_golgi_4501_6301_2897.h5'
45
---> 46 predict_classic(raw_path,model_path)

/wholebrain/u/rsaxena/devel/ELEKTRONN2/examples/prediction_helper.py in predict_classic(raw_path, model_path, pred_path, gpu)
27 initgpu(gpu)
28 raw3d = h5load(raw_path, 'raw')
---> 29 model = nm.model.modelload(model_path)
30 #raw3d = raw3d[:24,:186,:186]
31 raw4d = raw3d[None, :, :, :]

/u/rsaxena/devel/ELEKTRONN2/elektronn2/neuromancer/model.py in modelload(file_name, override_mfp_to_active, imposed_patch_size, imposed_batch_size, name, **model_load_kwargs)
663 print('YELLLLO')
664
--> 665 filter_shapes, pool_shapes, mfps = kernel_lists_from_node_descr(node_descr)
666 if override_mfp_to_active:
667

/u/rsaxena/devel/ELEKTRONN2/elektronn2/neuromancer/model.py in kernel_lists_from_node_descr(model_descr)
897 print('REST:::::::')
898 print(descr[0])
--> 899 pool_shapes.append(descr[0].args[3])
900 mfp.append(descr[0].kwargs.get('mfp', False))
901

IndexError: list index out of range

/u/rsaxena/devel/ELEKTRONN2/elektronn2/neuromancer/model.py(899)kernel_lists_from_node_descr()
897 print('REST:::::::')
898 print(descr[0])
--> 899 pool_shapes.append(descr[0].args[3])
900 mfp.append(descr[0].kwargs.get('mfp', False))
901

ipdb>