paddle infer的时候,出现如下错误

Paddle PaddlePaddle-Gardener 2022年3月25日 22:09 37 查看原文

源自github用户fanfannothing: 场景:使用cnn进行分类,model在paddlecloud上面训练生成。然后取model进行infer,出现错误(错误信息如下)。 错误信息: Traceback (most recent call last): File "infer.py", line 93, in batch_size=10) File "infer.py", line 57, in infer output_layer=prob_layer, parameters=parameters) File "/usr/local/lib/python2.7/dist-packages/paddle/v2/inference.py", line 31, in init val.copyFromNumpyArray(parameters.get(name).flatten()) File "/usr/local/lib/python2.7/dist-packages/paddle/v2/parameters.py", line 202, in get return self.getitem(key=parameter_name) File "/usr/local/lib/python2.7/dist-packages/paddle/v2/parameters.py", line 123, in getitem shape = self.get_shape(key) File "/usr/local/lib/python2.7/dist-packages/paddle/v2/parameters.py", line 160, in get_shape raise ValueError("No such parameter %s" % key) ValueError: No such parameter embeddinglayer_0.w0

回答
2 条回答

源自github用户hedaoyuan: Closed this issue, if there has any problem, feel free to reopen it.

源自github用户luotao1: No such parameter _embedding_layer_0.w0,从结论看是生成的model中没有这个参数,因此无法加载。

热门问题
相关推荐
推荐分类