'tensorflow._api.v2.experimental' 没有属性 'register_filesystem_plugin'
'tensorflow._api.v2.experimental' has no attribute 'register_filesystem_plugin'
我正在使用 TF2 对象检测 API。我正在执行 'Installation' 和 'Python Package Installation' 步骤 here。我正在使用我大学的 HPC 集群,并且有一个包含 TensorFlow 2.2.0 的模块系统。
我加载了这个 TF2 模块(它加载了一堆依赖),然后完成了安装步骤。完成这些后,我尝试 运行 测试安装脚本或实际训练任务,这给出了一个错误 no attribute 'register_filesystem_plugin'.
据我了解,这是 TF 2.7 API. Due to the module system, I am unable to succesfully downgrade or upgrade the tensorflow version. I have tried several different things including the downgrading the tensorflow_io outlined 的一部分。
我的印象是对象检测 API 只需要 TF 2.2?那么为什么它会使用 2.7 中的功能?
任何有关如何解决此问题的建议将不胜感激,谢谢!
这是我得到的完整堆栈:
Traceback (most recent call last):
File "object_detection/model_main_tf2.py", line 32, in <module>
from object_detection import model_lib_v2
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/object_detection/model_lib_v2.py", line 30, in <module>
from object_detection import inputs
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/object_detection/inputs.py", line 26, in <module>
from object_detection.builders import model_builder
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/object_detection/builders/model_builder.py", line 37, in <module>
from object_detection.meta_architectures import deepmac_meta_arch
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/object_detection/meta_architectures/deepmac_meta_arch.py", line 28, in <module>
import tensorflow_io as tfio # pylint:disable=g-import-not-at-top
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/tensorflow_io/__init__.py", line 17, in <module>
from tensorflow_io.python.api import * # pylint: disable=wildcard-import
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/tensorflow_io/python/api/__init__.py", line 19, in <module>
from tensorflow_io.python.ops.io_dataset import IODataset
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/tensorflow_io/python/ops/__init__.py", line 96, in <module>
plugin_ops = _load_library("libtensorflow_io_plugins.so", "fs")
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/tensorflow_io/python/ops/__init__.py", line 64, in _load_library
l = load_fn(f)
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/tensorflow_io/python/ops/__init__.py", line 56, in <lambda>
load_fn = lambda f: tf.experimental.register_filesystem_plugin(f) is None
AttributeError: module 'tensorflow._api.v2.experimental' has no attribute 'register_filesystem_plugin'
不幸的是,我能够解决这个问题的唯一方法是将我的 TensorFlow 版本从 2.2 更新到 2.7。我确实尝试更新到 2.3 和 2.4,并且可以通过查找特定文件并注释掉有问题的行来消除一些错误,但最终需要升级。
就像我在最初的问题中所说的那样,虽然 API 着陆页提到它与“2.2”兼容,但它们使用了更高版本中的实验代码。
我正在使用 TF2 对象检测 API。我正在执行 'Installation' 和 'Python Package Installation' 步骤 here。我正在使用我大学的 HPC 集群,并且有一个包含 TensorFlow 2.2.0 的模块系统。
我加载了这个 TF2 模块(它加载了一堆依赖),然后完成了安装步骤。完成这些后,我尝试 运行 测试安装脚本或实际训练任务,这给出了一个错误 no attribute 'register_filesystem_plugin'.
据我了解,这是 TF 2.7 API. Due to the module system, I am unable to succesfully downgrade or upgrade the tensorflow version. I have tried several different things including the downgrading the tensorflow_io outlined
我的印象是对象检测 API 只需要 TF 2.2?那么为什么它会使用 2.7 中的功能?
任何有关如何解决此问题的建议将不胜感激,谢谢!
这是我得到的完整堆栈:
Traceback (most recent call last):
File "object_detection/model_main_tf2.py", line 32, in <module>
from object_detection import model_lib_v2
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/object_detection/model_lib_v2.py", line 30, in <module>
from object_detection import inputs
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/object_detection/inputs.py", line 26, in <module>
from object_detection.builders import model_builder
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/object_detection/builders/model_builder.py", line 37, in <module>
from object_detection.meta_architectures import deepmac_meta_arch
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/object_detection/meta_architectures/deepmac_meta_arch.py", line 28, in <module>
import tensorflow_io as tfio # pylint:disable=g-import-not-at-top
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/tensorflow_io/__init__.py", line 17, in <module>
from tensorflow_io.python.api import * # pylint: disable=wildcard-import
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/tensorflow_io/python/api/__init__.py", line 19, in <module>
from tensorflow_io.python.ops.io_dataset import IODataset
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/tensorflow_io/python/ops/__init__.py", line 96, in <module>
plugin_ops = _load_library("libtensorflow_io_plugins.so", "fs")
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/tensorflow_io/python/ops/__init__.py", line 64, in _load_library
l = load_fn(f)
File "cluster/home/myname/thesis/env/lib/python3.7/site-packages/tensorflow_io/python/ops/__init__.py", line 56, in <lambda>
load_fn = lambda f: tf.experimental.register_filesystem_plugin(f) is None
AttributeError: module 'tensorflow._api.v2.experimental' has no attribute 'register_filesystem_plugin'
不幸的是,我能够解决这个问题的唯一方法是将我的 TensorFlow 版本从 2.2 更新到 2.7。我确实尝试更新到 2.3 和 2.4,并且可以通过查找特定文件并注释掉有问题的行来消除一些错误,但最终需要升级。
就像我在最初的问题中所说的那样,虽然 API 着陆页提到它与“2.2”兼容,但它们使用了更高版本中的实验代码。