Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

fluid.io.load_persistables加载时提示一个不存在的权重文件无法打开

Open ZENOTME opened this issue 6 years ago • 2 comments

训练模型后fluid.io.save_persistables保存,重新固化的模型的时候发现 UnavailableError: Load operator fail to open file yolo2-model/conv2d_75.w_0, please check whether the model file is complete or damaged. [Hint: Expected static_cast(fin) == true, but received static_cast(fin):0 != true:1.] at (/paddle/paddle/fluid/operators/load_op.h:41) [operator < load > error] 但是我发现保存模型的文件里面只有到conv2d_74.w_0,不存在conv2d_75.w_0,想请问这个地方是哪里出错了

ZENOTME avatar May 26 '20 09:05 ZENOTME

可能的情况是在保存了模型之后,模型结构又有了修改,或者之前保存的模型结构不完整。

kuke avatar May 27 '20 02:05 kuke

可能的情况是在保存了模型之后,模型结构又有了修改,或者之前保存的模型结构不完整。

应该是保存后又修改,我发现重新启动AI studio就解决了,似乎是因为我重复的运行了训练函数和固化函数

ZENOTME avatar May 27 '20 02:05 ZENOTME