DanielLin1986 / Function-level-Vulnerability-Detection

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

Obtain_representations.py: error: unrecognized arguments: --input_dir #16

Open aravinthk00 opened 1 year ago

aravinthk00 commented 1 year ago

My error log detail paste in below , please what's my mistake and assist me

(myenv) C:\Users\30863\Function-level-Vulnerability-Detection-master>python Obtain_representations.py --config config\config.yaml --input_dir C:\Users\30863\Function-level-Vulnerability-Detection-master\data --trained_model C:\Users\30863\Function-level-Vulnerability-Detection-master\result\models --layer 5 --saved_path C:\Users\30863\Py_files\Save_obtain Using TensorFlow backend. 2022-08-04 17:19:20.416755: 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-04 17:19:20.416860: 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. usage: Obtain_representations.py [-h] [--config CONFIG] [--data_dir DATA_DIR] [--trained_model TRAINED_MODEL] [--layer LAYER] [--saved_path SAVED_PATH] [--verbose VERBOSE] Obtain_representations.py: error: unrecognized arguments: --input_dir C:\Users\30863\Function-level-Vulnerability-Detection-master\data

DanielLin1986 commented 1 year ago

Please change the "--input_dir" to "--data_dir".

aravinthk00 commented 1 year ago

(myenv) C:\Users\30863\Function-level-Vulnerability-Detection-master>Python Obtain_representations.py --config config\config.yaml --data_dir C:\Users\30863\Function-level-Vulnerability-Detection-master\data --trained_model C:\Users\30863\Function-level-Vulnerability-Detection-master\result\models --layer 5 --saved_path C:\Users\30863\Py_files\Save_obtain Using TensorFlow backend. 2022-08-08 20:50:26.166755: 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-08 20:50:26.166910: 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] Obtain representations from trained model.... [INFO] Loading data from C:\Users\30863\Function-level-Vulnerability-Detection-master\C:\Users\30863\Function-level-Vulnerability-Detection-master\data [INFO] Loading data from C:\Users\30863\Function-level-Vulnerability-Detection-master\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] Loading the trained model. [INFO] Failed to load the trained model! Traceback (most recent call last): File "Obtain_representations.py", line 27, in helper.exec() File "C:\Users\30863\Function-level-Vulnerability-Detection-master\src\helper.py", line 406, in exec obtained_repre = self.ObtainRepresentations(data_list_pad, self.paras.layer, model) File "C:\Users\30863\Function-level-Vulnerability-Detection-master\src\helper.py", line 373, in ObtainRepresentations layered_model = Model(inputs = model.input, outputs=model.layers[layer_number].output) AttributeError: 'NoneType' object has no attribute 'input'