nacayu / CRFNet_Tensorflow2.4.1

Reproduce CRFNet official implementation on windows10, tensorflow2.4.1
Other
35 stars 5 forks source link

A question of "SystemError: unknown opcode" #2

Closed AotianDong closed 1 year ago

AotianDong commented 2 years ago

@nacayu Hi, I have another problem. When I run "python test_crfnet.py --model saved_models/crf_net.h5 --config configs/crf_net.cfg --st 0.5" in the bash, it raised an error "SystemError: unknown opcode". Following are the details that the shell displayed:

Using TensorFlow backend.
2022-04-25 15:12:17.268306: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
WARNING:tensorflow:From /home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/tensorflow/python/compat/v2_compat.py:96: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
======
Loading NuScenes tables for version v1.0-mini...
23 category,
8 attribute,
4 visibility,
911 instance,
12 sensor,
120 calibrated_sensor,
31206 ego_pose,
8 log,
10 scene,
404 sample,
31206 sample_data,
18538 sample_annotation,
4 map,
Done loading in 0.7 seconds.
======
Reverse indexing ...
Done reverse indexing in 0.1 seconds.
======
Initializing data generator: / |#                     | 0 Elapsed Time: 0:00:00XXX lineno: 75, opcode: 0
Traceback (most recent call last):
  File "/home/dat/Documents/code/crfnet/test_crfnet.py", line 145, in <module>
    model = keras.models.load_model(args.model, custom_objects=backbone.custom_objects)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/engine/saving.py", line 419, in load_model
    model = _deserialize_model(f, custom_objects, compile)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/engine/saving.py", line 225, in _deserialize_model
    model = model_from_config(model_config, custom_objects=custom_objects)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/engine/saving.py", line 458, in model_from_config
    return deserialize(config, custom_objects=custom_objects)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/layers/__init__.py", line 55, in deserialize
    printable_module_name='layer')
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 145, in deserialize_keras_object
    list(custom_objects.items())))
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/engine/network.py", line 1032, in from_config
    process_node(layer, node_data)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/engine/network.py", line 991, in process_node
    layer(unpack_singleton(input_tensors), **kwargs)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/engine/base_layer.py", line 457, in __call__
    output = self.call(inputs, **kwargs)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/layers/core.py", line 687, in call
    return self.function(inputs, **arguments)
  File "../ssnn/model/architectures/vggmax.py", line 75, in func
SystemError: unknown opcode

Process finished with exit code 1

And following are some packages version:

h5py                                  2.10.0
Keras                                 2.2.4
Keras-Applications            1.0.8
Keras-Preprocessing          1.1.2
keras-resnet                        0.2.0
numpy                                1.19.5
opencv-python                   3.4.17.63
scikit-learn                          0.24.2
scipy                                   1.5.4
tensorboard                        2.8.0
tensorboard-data-server     0.6.1
tensorboard-plugin-wit      1.8.1
tensorflow-estimator          2.4.0
tensorflow-gpu                   2.4.1
tensorflow-serving-api-gpu    2.4.1
termcolor                            1.1.0
terminado                           0.13.0
testpath                               0.6.0
nacayu commented 2 years ago

@AotianDong Hi, this might be the python version problem that your pretrained "crfnet.h5" file was trained on python3.5 or the earlier version, but your python version is not suitable for this. I suggest you should train your model to generate an h5 file and then use this to test

AotianDong commented 2 years ago

@nacayu Hi, I solved this issue. I'm retraining the model file. Thank you for your help.