首页 > 解决方案 > NewRandomAccessFile 无法创建/打开 tfhub python

问题描述

我正在使用tensorflow==1.15.5,当我加载这样的模块时

elmo = hub.Module("https://tfhub.dev/google/elmo/2", trainable=True)

它显示错误

Exception has occurred: NotFoundError
NewRandomAccessFile failed to Create/Open: C:\Users\sgarg\AppData\Local\Temp\tfhub_modules\9bb74bc86f9caffc8c47dd7b33ec4bb354d9602d\tfhub_module.pb : The system cannot find the file specified.
; No such file or directory
  File "C:\bots\deep_learning_bot.py", line 18, in <module>
    elmo = hub.Module("https://tfhub.dev/google/elmo/2", trainable=True)
  File "C:\api\chat_service.py", line 9, in <module>
    from bots.deep_learning_bot import DeepLearningBot
  File "C:\main.py", line 13, in <module>
    from api import chat_service

这是其他部门版本

absl-py==0.13.0
asgiref==3.4.1
astor==0.8.1
cached-property==1.5.2
click==8.0.1
colorama==0.4.4
fastapi==0.65.2
gast==0.2.2
google-pasta==0.2.0
grpcio==1.38.1
h11==0.12.0
h5py==2.10.0
importlib-metadata==4.6.1
joblib==1.0.1
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
Markdown==3.3.4
numpy==1.18.5
opt-einsum==3.3.0
protobuf==3.17.3
pydantic==1.8.2
python-dotenv==0.18.0
scikit-learn==0.24.2
scipy==1.7.0
six==1.16.0
sklearn==0.0
starlette==0.14.2
tensorboard==1.15.0
tensorflow==1.15.5
tensorflow-estimator==1.15.1
tensorflow-hub==0.12.0
termcolor==1.1.0
threadpoolctl==2.1.0
typing-extensions==3.10.0.0
uvicorn==0.14.0
Werkzeug==2.0.1
wrapt==1.12.1
zipp==3.5.0

标签: pythontensorflowtensorflow-hub

解决方案


推荐阅读