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

SystemError: unknown opcode when running the example #3

Open
ZeitgeberH opened this issue Jan 22, 2018 · 5 comments
Open

SystemError: unknown opcode when running the example #3

ZeitgeberH opened this issue Jan 22, 2018 · 5 comments

Comments

@ZeitgeberH
Copy link

I was trying to run the example described in the setup instructions:
CUDA_VISIBLE_DEVICES="0" python unet2ds_nf.py evaluate neurofinder.00.00 --model unet2ds_model.hdf5

The error is as follows:

/home/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
return f(*args, **kwds)
/home/anaconda3/lib/python3.6/site-packages/h5py/init.py:34: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Using TensorFlow backend.
INFO:nf_load_hdf5:neurofinder.00.00 already downloaded.
INFO:nf_load_hdf5:Preparing hdf5 files for neurofinder.00.00.
INFO:evaluation:Evaluation with TTA.
XXX lineno: 167, opcode: 0
Traceback (most recent call last):
File "unet2ds_nf.py", line 147, in
f(**args)
File "unet2ds_nf.py", line 68, in evaluation
augmentation=aug, # Test-time augmentation.
File "/home/.local/lib/python3.6/site-packages/deepcalcium/models/neurons/unet_2d_summary.py", line 561, in predict
custom_objects=self.custom_objects)
File "/home/.local/lib/python3.6/site-packages/deepcalcium/utils/keras_helpers.py", line 66, in load_model_with_new_input_shape
model = load_model(path, **load_model_args)
File "/home/anaconda3/lib/python3.6/site-packages/keras/models.py", line 243, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/home/anaconda3/lib/python3.6/site-packages/keras/models.py", line 317, in model_from_config
return layer_module.deserialize(config, custom_objects=custom_objects)
File "/home/anaconda3/lib/python3.6/site-packages/keras/layers/init.py", line 55, in deserialize
printable_module_name='layer')
File "/home/anaconda3/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 143, in deserialize_keras_object
list(custom_objects.items())))
File "/home/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 2517, in from_config
process_node(layer, node_data)
File "/home/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 2474, in process_node
layer(input_tensors[0], **kwargs)
File "/home/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 617, in call
output = self.call(inputs, **kwargs)
File "/home/anaconda3/lib/python3.6/site-packages/keras/layers/core.py", line 663, in call
return self.function(inputs, **arguments)
File "../deepcalcium/models/neurons/unet_2d_summary.py", line 167, in
SystemError: unknown opcode

@alexklibisz
Copy link
Owner

alexklibisz commented Jan 23, 2018

Looks like you might need to try running with python 3.5. Seems your conda version is 3.6.

RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6

@ZeitgeberH
Copy link
Author

Thanks, Alex. I'll setup a 3.5 env to try.

@alexklibisz
Copy link
Owner

@ZeitgeberH Any updates on this? It might be tough to get everything running under Anaconda, as the code uses several niche libraries which are probably not on condaforge.

@yiluzhou
Copy link

I was trying to run:
CUDA_VISIBLE_DEVICES="0" python unet2ds_nf.py evaluate neurofinder.00.00 --model unet2ds_model.hdf5

(I don't have RuntimeWarning as last post)
The error is as follows:

$ CUDA_VISIBLE_DEVICES="0" python unet2ds_nf.py evaluate neurofinder.00.00 --model unet2ds_model.hdf5
D:\ProgramData\Anaconda3\lib\site-packages\h5py_init_.py:34: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as register_converters
Using TensorFlow backend.
INFO:nf_load_hdf5:neurofinder.00.00 already downloaded.
INFO:nf_load_hdf5:Preparing hdf5 files for neurofinder.00.00.
INFO:evaluation:Evaluation with TTA.
XXX lineno: 167, opcode: 0
Traceback (most recent call last):
File "unet2ds_nf.py", line 147, in
f(**args)
File "unet2ds_nf.py", line 68, in evaluation
augmentation=aug, # Test-time augmentation.
File "C:\Users\Deep\AppData\Roaming\Python\Python36\site-packages\deepcalcium\models\neurons\unet_2d_summary.py", line 561, in predict
custom_objects=self.custom_objects)
File "C:\Users\Deep\AppData\Roaming\Python\Python36\site-packages\deepcalcium\utils\keras_helpers.py", line 66, in load_model_with_new_input_shape
model = load_model(path, **load_model_args)
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\models.py", line 243, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\models.py", line 317, in model_from_config
return layer_module.deserialize(config, custom_objects=custom_objects)
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\layers_init
.py", line 55, in deserialize
printable_module_name='layer')
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\utils\generic_utils.py", line 143, in deserialize_keras_object
list(custom_objects.items())))
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\engine\topology.py", line 2517, in from_config
process_node(layer, node_data)
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\engine\topology.py", line 2474, in process_node
layer(input_tensors[0], **kwargs)
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\engine\topology.py", line 617, in call
output = self.call(inputs, **kwargs)
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\layers\core.py", line 663, in call
return self.function(inputs, **arguments)
File "../deepcalcium/models/neurons/unet_2d_summary.py", line 167, in
SystemError: unknown opcode

Any idea?
Thank you!!!

@alexklibisz
Copy link
Owner

From a cursory look, I think it's a problem with library versions for loading the network weights.

Some of the used are very sensitive to the Python version and versions of other libs. If you use the given requirements.txt file with Python 3.5 (not Conda), it should work.

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

3 participants