DanielLin1986 / Function-level-Vulnerability-Detection

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

What version of python are you using? #1

Open diewufeihong opened 4 years ago

diewufeihong commented 4 years ago

I encountered some problems during the reproduction process, which may be caused by inconsistent versions. What version of python are you using?

diewufeihong commented 4 years ago

The following is the specific error message: /home/lm/anaconda3/envs/py36/lib/python3.6/site-packages/keras/callbacks/tensorboard_v2.py:92: UserWarning: The TensorBoard callback batch_size argument (for histogram computation) is deprecated with TensorFlow 2.0. It will be ignored. warnings.warn('The TensorBoard callback batch_size argument ' /home/lm/anaconda3/envs/py36/lib/python3.6/site-packages/keras/callbacks/tensorboard_v2.py:97: UserWarning: The TensorBoard callback does not support gradients display when using TensorFlow 2.0. The write_grads argument is ignored. warnings.warn('The TensorBoard callback does not support ' Train on 397 samples, validate on 100 samples Traceback (most recent call last): File "main.py", line 34, in helper.exec() File "/home/lm/Function-level-Vulnerability-Detection/src/helper.py", line 274, in exec class_weight = class_weights) File "/home/lm/anaconda3/envs/py36/lib/python3.6/site-packages/keras/engine/training.py", line 1239, in fit validation_freq=validation_freq) File "/home/lm/anaconda3/envs/py36/lib/python3.6/site-packages/keras/engine/training_arrays.py", line 119, in fit_loop callbacks.set_model(callback_model) File "/home/lm/anaconda3/envs/py36/lib/python3.6/site-packages/keras/callbacks/callbacks.py", line 68, in set_model callback.set_model(model) File "/home/lm/anaconda3/envs/py36/lib/python3.6/site-packages/keras/callbacks/tensorboard_v2.py", line 116, in set_model super(TensorBoard, self).set_model(model) File "/home/lm/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/keras/callbacks.py", line 1532, in set_model self.log_dir, self.model._get_distribution_strategy()) # pylint: disable=protected-access AttributeError: 'Model' object has no attribute '_get_distribution_strategy'

DanielLin1986 commented 4 years ago

Hi there, the code has been tested on Python 3.7.x and Python 3.6.x. And the versions of Tensorflow supported are 1.12.0, 1.13.0 and 1.14.0. Tensorflow 2.0 is currently not supported.

diewufeihong commented 4 years ago

I have received your reply, I will try it with a new version, thank you very much.

DanielLin1986 commented 4 years ago

No worries. Please use Tensorflow 1.14.0 if it is possible. B.T.W, the Keras version supported is 2.2.x. Please leave a message if you have issues running the code.

diewufeihong commented 4 years ago

Okay!

Zaibali9999 commented 2 years ago

Facing issue with testing model_load function fn = module_objects.get(function_name) AttributeError: 'NoneType' object has no attribute 'get'

how to add custom object custom_objects={"Lambda": Lambda}

aravinthk00 commented 1 year ago

I also encountered same issue noww.. could you help anyone ?