DanielLin1986 / Function-level-Vulnerability-Detection

A deep learning-based vulnerability detection framework
74 stars 23 forks source link

Facing Decoding error #8

Open Cyberzeroo opened 2 years ago

Cyberzeroo commented 2 years ago

Using TensorFlow backend. [INFO] Start testing process.... [INFO] Loading test data from /content/drive/MyDrive/TATA/Function-level-Vulnerability-Detection-master//content/drive/MyDrive/test [INFO] Loading data from /content/drive/MyDrive/TATA/Function-level-Vulnerability-Detection-master//content/drive/MyDrive/test.... [INFO] The length of the loaded data list is : 186 [INFO] Pad the sequence to unified length... Traceback (most recent call last): File "main.py", line 34, in helper.exec() File "/content/drive/MyDrive/TATA/Function-level-Vulnerability-Detection-master/src/helper.py", line 349, in exec model = self.modelLoader() File "/content/drive/MyDrive/TATA/Function-level-Vulnerability-Detection-master/src/helper.py", line 112, in modelLoader trained_model = load_model(trained_model_path) File "/usr/local/lib/python3.7/site-packages/keras/engine/saving.py", line 492, in load_wrapper return load_function(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/keras/engine/saving.py", line 584, in load_model model = _deserialize_model(h5dict, custom_objects, compile) File "/usr/local/lib/python3.7/site-packages/keras/engine/saving.py", line 273, in _deserialize_model model_config = json.loads(model_config.decode('utf-8')) AttributeError: 'str' object has no attribute 'decode'

Fr2nkkk commented 2 years ago

Try pip install 'h5py<3.0.0'

1112z-c commented 2 years ago

Try pip install 'h5py<3.0.0'

请问,是否复现成功了?

Fr2nkkk commented 2 years ago

已经复现成功了

lab-pc commented 2 years ago
"name_scope was already taken." % abs_state_scope)

RuntimeError: Exception encountered when calling layer "lambda" (type Lambda).

variable_scope module_1/ was unused but the corresponding name_scope was already taken.

Call arguments received by layer "lambda" (type Lambda): • inputs=tf.Tensor(shape=(None, 1), dtype=string) • mask=None • training=True

Zaibali9999 commented 2 years ago

fn = module_objects.get(function_name) AttributeError: 'NoneType' object has no attribute 'get' Testing Part Issue

Zaibali9999 commented 2 years ago

check tensorflow version and elmo_model = hub.Module("https://tfhub.dev/google/elmo/3", trainable=True)

Zaibali9999 commented 2 years ago

Traceback (most recent call last): File "main.py", line 36, in helper.exec() File "/media/user/206CB0116CAFDFB07/HP-Artifical-Int/Function-level-Vulnerability-Detection/src/helper.py", line 347, in exec model = self.modelLoader() File "/media/user/206CB0116CAFDFB07/HP-Artifical-Int/Function-level-Vulnerability-Detection/src/helper.py", line 107, in modelLoader trained_model = load_model(trained_model_path) File "/home/user/anaconda3/envs/function-level-elmo-bilstm/lib/python3.7/site-packages/keras/engine/saving.py", line 419, in load_model model = _deserialize_model(f, custom_objects, compile) File "/home/user/anaconda3/envs/function-level-elmo-bilstm/lib/python3.7/site-packages/keras/engine/saving.py", line 225, in _deserialize_model model = model_from_config(model_config, custom_objects=custom_objects) File "/home/user/anaconda3/envs/function-level-elmo-bilstm/lib/python3.7/site-packages/keras/engine/saving.py", line 458, in model_from_config return deserialize(config, custom_objects=custom_objects) File "/home/user/anaconda3/envs/function-level-elmo-bilstm/lib/python3.7/site-packages/keras/layers/init.py", line 55, in deserialize printable_module_name='layer') File "/home/user/anaconda3/envs/function-level-elmo-bilstm/lib/python3.7/site-packages/keras/utils/generic_utils.py", line 145, in deserialize_keras_object

list(custom_objects.items()))) File "/home/user/anaconda3/envs/function-level-elmo-bilstm/lib/python3.7/site-packages/keras/layers/core.py", line 732, in from_config printable_module_name='function in Lambda layer') File "/home/user/anaconda3/envs/function-level-elmo-bilstm/lib/python3.7/site-packages/keras/utils/generic_utils.py", line 162, in deserialize_keras_object fn = module_objects.get(function_name) AttributeError: 'NoneType' object has no attribute 'get'

Zaibali9999 commented 2 years ago

run_metadata_ptr) tensorflow.python.framework.errors_impl.InternalError: Unsupported object type int