我在Tensorflow 2.x中加载Tensorflow 1.x保存的模型时遇到了问题
我使用了以下代码
我遇到了以下错误
OSError: Unable to open file (unable to open file: name = 'my_drive/AI_values/model/model.ckpt', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
显示的是操作系统错误,涉及权限问题,并且显示无法打开文件,但我尝试了.ckpt和.h5两种格式,但都不起作用。
请帮助我解决这个问题,我分享了我的模型的Google Drive链接
https://drive.google.com/open?id=1tPoUDM5Re3ZKXwK2f7kbzwK8Lad6vtCX
以及Google Colab链接
https://colab.research.google.com/drive/1hf7AwEMJHf4zLZOBSzxejA2ISuTQ3N9K
回答:
你能在
model_file_name = os.path.join("my_drive/AI_values/model", 'model.ckpt')
中将my_drive
替换为My Drive
(包括空格)然后再试试吗?