Open Cyberzeroo opened 2 years ago
Try pip install 'h5py<3.0.0'
Try pip install 'h5py<3.0.0'
请问,是否复现成功了?
已经复现成功了
"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
fn = module_objects.get(function_name) AttributeError: 'NoneType' object has no attribute 'get' Testing Part Issue
check tensorflow version and
elmo_model
= hub.Module("https://tfhub.dev/google/elmo/3", trainable=True)
Traceback (most recent call last):
File "main.py", line 36, in
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'
run_metadata_ptr) tensorflow.python.framework.errors_impl.InternalError: Unsupported object type int
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'