如何在Azure ML中使用Tensorflow Hub
我正在尝试在Azure ML Studio中使用TensorFlow Hub,
我正在使用内核Python 3.8 pt和tf,
并且我安装了一些模块:
!pip install bert-for-tf2
!pip install sentencepiece
!pip install "tensorflow>=2.0.0"
!pip install --upgrade tensorflow-hub
使用PIP列表,我可以看到它们已安装:
tensorflow 2.8.0
tensorflow-estimator 2.3.0
tensorflow-gpu 2.3.0
tensorflow-hub 0.12.0
tensorflow-io-gcs-filesystem 0.24.0
但是,当我尝试根据文档使用它时使用它。 ( https://www.tensorflow.org/hub )
然后我得到经典:
ModuleNotFoundError: No module named 'tensorflow_hub'
I am trying to use TensorFlow Hub in Azure ML Studio
I am using the kernel Python 3.8 PT and TF
And I installed a few modules:
!pip install bert-for-tf2
!pip install sentencepiece
!pip install "tensorflow>=2.0.0"
!pip install --upgrade tensorflow-hub
With pip list, I can see they are installed:
tensorflow 2.8.0
tensorflow-estimator 2.3.0
tensorflow-gpu 2.3.0
tensorflow-hub 0.12.0
tensorflow-io-gcs-filesystem 0.24.0
However when I try to use it as per the documentation (https://www.tensorflow.org/hub)
Then I get the classic:
ModuleNotFoundError: No module named 'tensorflow_hub'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要解决此
modulenotFoundError:no模块名为'tensorflow_hub'
错误,请尝试以下方式:tensorflow
tensorflow-hub
然后导入:您可以参考 modulenotfoundError:> modulenotfounderror:没有名为“ tensorflow_hub'的模块,no模块名为'tensorflow_hub'和
To resolve this
ModuleNotFoundError: No module named 'tensorflow_hub'
error, try following ways:tensorflow
andtensorflow-hub
and then import:You can refer to ModuleNotFoundError: No module named 'tensorflow_hub', No module named 'tensorflow_hub' and How to use Tensorflow Hub Model?