前提
画像を用いた機械学習をしようと思っております。
gpuを導入してからtensorflow_hubのimport時ににエラーが出るようになりました。
実現したいこと
tensorflow_hubのimport
発生している問題・エラーメッセージ
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_4116\551644934.py in <module> 1 import tensorflow ----> 2 import tensorflow_hub ~\anaconda3\lib\site-packages\tensorflow_hub\__init__.py in <module> 86 87 ---> 88 from tensorflow_hub.estimator import LatestModuleExporter 89 from tensorflow_hub.estimator import register_module_for_export 90 from tensorflow_hub.feature_column import image_embedding_column ~\anaconda3\lib\site-packages\tensorflow_hub\estimator.py in <module> 60 61 ---> 62 class LatestModuleExporter(tf.compat.v1.estimator.Exporter): 63 """Regularly exports registered modules into timestamped directories. 64 ~\anaconda3\lib\site-packages\tensorflow\python\util\lazy_loader.py in __getattr__(self, item) 60 61 def __getattr__(self, item): ---> 62 module = self._load() 63 return getattr(module, item) 64 ~\anaconda3\lib\site-packages\tensorflow\python\util\lazy_loader.py in _load(self) 43 """Load the module and insert it into the parent's globals.""" 44 # Import the target module and insert it into the parent's namespace ---> 45 module = importlib.import_module(self.__name__) 46 self._parent_module_globals[self._local_name] = module 47 ~\anaconda3\lib\importlib\__init__.py in import_module(name, package) 125 break 126 level += 1 --> 127 return _bootstrap._gcd_import(name[level:], package, level) 128 129 ~\anaconda3\lib\site-packages\tensorflow_estimator\python\estimator\api\_v1\estimator\__init__.py in <module> 6 import sys as _sys 7 ----> 8 from tensorflow_estimator.python.estimator.api._v1.estimator import experimental 9 from tensorflow_estimator.python.estimator.api._v1.estimator import export 10 from tensorflow_estimator.python.estimator.api._v1.estimator import inputs ~\anaconda3\lib\site-packages\tensorflow_estimator\python\estimator\api\_v1\estimator\experimental\__init__.py in <module> 6 import sys as _sys 7 ----> 8 from tensorflow_estimator.python.estimator.canned.dnn import dnn_logit_fn_builder 9 from tensorflow_estimator.python.estimator.canned.kmeans import KMeansClustering as KMeans 10 from tensorflow_estimator.python.estimator.canned.linear import LinearSDCA ~\anaconda3\lib\site-packages\tensorflow_estimator\python\estimator\canned\dnn.py in <module> 25 from tensorflow.python.framework import ops 26 from tensorflow.python.util.tf_export import estimator_export ---> 27 from tensorflow_estimator.python.estimator import estimator 28 from tensorflow_estimator.python.estimator.canned import head as head_lib 29 from tensorflow_estimator.python.estimator.canned import optimizers ~\anaconda3\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py in <module> 29 from google.protobuf import message 30 from tensorflow.core.framework import summary_pb2 ---> 31 from tensorflow.python.checkpoint import checkpoint as trackable_util 32 from tensorflow.python.checkpoint import checkpoint_management 33 from tensorflow.python.checkpoint import graph_view ModuleNotFoundError: No module named 'tensorflow.python.checkpoint'
該当のソースコード
python
1import tensorflow 2import tensorflow_hub
試したこと
tensorflowのバージョン変更。
再起動。
補足情報(FW/ツールのバージョンなど)
anaconda使用。
jupyterで作業してます。
versionは以下。
tensorboard 2.10.1
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.1
tensorflow 2.10.0
tensorflow-estimator 2.10.0
tensorflow-gpu 2.10.0
tensorflow-hub 0.12.0
tensorflow-io-gcs-filesystem 0.27.0
回答1件
あなたの回答
tips
プレビュー