我想使用Google Cloud Functions来部署以JSON格式保存的keras模型(包括HDF5中的权重),并将tensorflow作为后端.
当我没有在requirements.txt中指定tensorflow时,部署成功.虽然在GCP中测试函数时,我收到错误消息,指出无法找到tensorflow.
Error: function crashed. Details:
No module named 'tensorflow'
Run Code Online (Sandbox Code Playgroud)
首先,我发现谷歌没有提供预先安装张量流的环境,这很奇怪.
但是现在,如果我在requirements.txt中指定了tensorflow,则部署将失败并显示错误消息
ERROR: (gcloud.beta.functions.deploy) OperationError:
code=3, message=Build failed: USER ERROR:
`pip_download_wheels` had stderr output:
Could not find a version that satisfies the
requirement tensorflow (from -r /dev/stdin (line 5))
(from versions: )
No matching distribution found for tensorflow (from -r
/dev/stdin (line 5))
Run Code Online (Sandbox Code Playgroud)
有没有办法让我可以在云功能上获得张量流,或谷歌故意阻止安装让我们使用ML引擎?