读取保存的TFmodel出现NotFoundError

本文解决了在使用TensorFlow加载模型时出现的NotFoundError问题。通过调整模型名称并使用完整的相对路径来解决文件读取失败的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for ../target-predict/data/kegg_GPopt_model/2018-05-15-16-02-01/67, [1478], 0.0005691415809378206, 0.0004931419580688316, 0.27912254612734133, 40.pickle


解决:https://github.com/tensorflow/tensorflow/issues/6082 

Could you try the following:

  1. use a model name without the character [], and:
  2. when you tried to restore, use the full relative path ./model_epoch10 rather than model_epoch10

If my guess is right then you should see it work. It it doesn't, could you give the steps so that people can reproduce the problem (i.e. how to use your code).


总结:

TF的model的名字不能带有 [ ] , : 这三个字符

于是把最好的模型复制出来重命名了,解决。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值