-
Notifications
You must be signed in to change notification settings - Fork 24
Description
I try to test the trained model but I getting error , given below my error log :
(myenv) C:\Users\30863\Function-level-Vulnerability-Detection-master>Python main.py --config config\config.yaml --test --trained_model C:\Users\30863\Function-level-Vulnerability-Detection-master\result\models\test_model_01_0.920_0.334828.h5
Using TensorFlow backend.
2022-08-09 14:51:29.072700: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found
2022-08-09 14:51:29.072841: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
[INFO] Start testing process....
[INFO] Loading data from C:\Users\30863\Function-level-Vulnerability-Detection-master\data/....
[INFO] The length of the loaded data list is : 622
[INFO] Pad the sequence to unified length...
[INFO] Patition the data ....
[INFO] There are 125 total samples in the test set. 9 vulnerable samples.
WARNING:tensorflow:From C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\keras\backend\tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
Traceback (most recent call last):
File "main.py", line 34, in
helper.exec()
File "C:\Users\30863\Function-level-Vulnerability-Detection-master\src\helper.py", line 345, in exec
model = self.modelLoader()
File "C:\Users\30863\Function-level-Vulnerability-Detection-master\src\helper.py", line 112, in modelLoader
trained_model = load_model(trained_model_path)
File "C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\keras\engine\saving.py", line 419, in load_model
model = deserialize_model(f, custom_objects, compile)
File "C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\keras\engine\saving.py", line 225, in deserialize_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\keras\engine\saving.py", line 458, in model_from_config
return deserialize(config, custom_objects=custom_objects)
File "C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\keras\layers_init.py", line 55, in deserialize
printable_module_name='layer')
File "C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\keras\utils\generic_utils.py", line 145, in deserialize_keras_object
list(custom_objects.items())))
File "C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\keras\engine\network.py", line 1022, in from_config
process_layer(layer_data)
File "C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\keras\engine\network.py", line 1008, in process_layer
custom_objects=custom_objects)
File "C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\keras\layers_init.py", line 55, in deserialize
printable_module_name='layer')
File "C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\keras\utils\generic_utils.py", line 145, in deserialize_keras_object
list(custom_objects.items())))
File "C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\keras\layers\core.py", line 732, in from_config
printable_module_name='function in Lambda layer')
File "C:\Users\30863\Anaconda3\envs\myenv\lib\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'