Skip to content

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

@aravinthk00

Description

@aravinthk00

(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 ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions