Dar*_*eam 4 python amazon-web-services keras tensorflow
我正在尝试使用以下命令在 aws 服务器上加载 Keras 模型
import tensorflow_hub as hub
from keras.models import load_model
model = load_model(model_path, custom_objects={'KerasLayer': hub.KerasLayer})
Run Code Online (Sandbox Code Playgroud)
但它给出了一个错误
FileNotFoundError: Op type not registered 'RegexSplitWithOffsets' in binary running on ip-10-0-xx-xxx.us-east-2.compute.internal. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
You may be trying to load on a different device from the computational device. Consider setting the `experimental_io_device` option in `tf.saved_model.LoadOptions` to the io_device such as '/job:localhost'.
Run Code Online (Sandbox Code Playgroud)
完全相同的代码前几天可以工作,但这次出现错误。我仔细检查了模型文件是否仍然存在于指定的路径上。此外,该文件没有被修改,因此毫无疑问该文件已损坏或发生任何其他情况。
我猜这个错误必须与 aws 相关,但我不知道如何解决它。我尝试在网上寻找任何解决方案,但没有帮助。
| 归档时间: |
|
| 查看次数: |
1291 次 |
| 最近记录: |