DanielLin1986 / Function-level-Vulnerability-Detection

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

AttributeError: module 'tensorflow._api.v1.compat.v1' has no attribute 'estimator' #14

Open aravinthk00 opened 1 year ago

aravinthk00 commented 1 year ago

(myenv) C:\Users\30863\Func-level-vul-detect>python main.py --config config\config.yaml --data_dir C:\Users\30863\Func-level-vul-detect\data --embedding elmo Using TensorFlow backend. Traceback (most recent call last): File "main.py", line 29, in from src.helper import Trainer as Helper File "C:\Users\30863\Func-level-vul-detect\src\helper.py", line 34, in from src.models.elmo_network import elmo_model File "C:\Users\30863\Func-level-vul-detect\src\models\elmo_network.py", line 9, in import tensorflow_hub as hub File "C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\tensorflow_hub__init.py", line 88, in from tensorflow_hub.estimator import LatestModuleExporter File "C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\tensorflow_hub\estimator.py", line 62, in class LatestModuleExporter(tf.compat.v1.estimator.Exporter): File "C:\Users\30863\Anaconda3\envs\myenv\lib\site-packages\tensorflow_core\python\util\module_wrapper.py", line 193, in getattr__ attr = getattr(self._tfmw_wrapped_module, name) AttributeError: module 'tensorflow._api.v1.compat.v1' has no attribute 'estimator'

could you help me and advance thanks ...