属性错误:模块“tensorflow_estimator.python.estimator.api._v1.estimator”没有属性“slim”

问题描述 投票:0回答:2

我正在尝试运行训练命令并收到以下错误。

命令:-

python Tensorflow\models\research\object_detection\model_main_tf2.py --model_dir=Tensorflow\workspace\models\my_ssd_mobnet --pipeline_config_path=Tensorflow\workspace\models\my_ssd_mobnet\pipeline.config --num_train_steps=10000

错误:-

2022-03-24 23:29:43.298657: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-03-24 23:29:43.298983: 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.
Traceback (most recent call last):
  File "C:\Users\USER\Documents\Python Scripts\ANPR_Detection\Tensorflow\models\research\object_detection\model_main_tf2.py", line 32, in <module>
    from object_detection import model_lib_v2
  File "C:\Users\USER\anaconda3\envs\anprsys\lib\site-packages\object_detection\model_lib_v2.py", line 30, in <module>
    from object_detection import inputs
  File "C:\Users\USER\anaconda3\envs\anprsys\lib\site-packages\object_detection\inputs.py", line 24, in <module>
    from object_detection.builders import dataset_builder
  File "C:\Users\USER\anaconda3\envs\anprsys\lib\site-packages\object_detection\builders\dataset_builder.py", line 27, in <module>
    from object_detection.data_decoders import tf_example_decoder
  File "C:\Users\USER\anaconda3\envs\anprsys\lib\site-packages\object_detection\data_decoders\tf_example_decoder.py", line 28, in <module>
    slim_example_decoder = tf.compat.v1.estimator.slim.tfexample_decoder
  File "C:\Users\USER\AppData\Roaming\Python\Python39\site-packages\tensorflow\python\util\lazy_loader.py", line 59, in __getattr__
    return getattr(module, item)
  File "C:\Users\USER\AppData\Roaming\Python\Python39\site-packages\tensorflow\python\util\module_wrapper.py", line 232, in _getattr
    attr = getattr(self._tfmw_wrapped_module, name)
AttributeError: module 'tensorflow_estimator.python.estimator.api._v1.estimator' has no attribute 'slim'

我已经使用

pip install slim
以及
pip install tf-slim
安装 slim。

python tensorflow slim
2个回答
0
投票

来自张量流/模型/研究/

导出 PYTHONPATH=$PYTHONPATH:

pwd
:
pwd
/slim


0
投票

你找到解决办法了吗?

遇到完全相同的问题

© www.soinside.com 2019 - 2024. All rights reserved.