Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

03.image_classification 报错 #754

Open
luckeriam opened this issue Jun 19, 2019 · 5 comments
Open

03.image_classification 报错 #754

luckeriam opened this issue Jun 19, 2019 · 5 comments
Assignees
Labels

Comments

@luckeriam
Copy link

Inferencer 配置和预测
代码部分运行报错

ValueErrorTraceback (most recent call last)
in ()
6
7 [inference_program, feed_target_names,
----> 8 fetch_targets] = fluid.io.load_inference_model(params_dirname, exe)
9
10 # The input's dimension of conv should be 4-D or 5-D.

/opt/conda/lib/python2.7/site-packages/paddle/fluid/io.pyc in load_inference_model(dirname, executor, model_filename, params_filename, pserver_endpoints)
1079 """
1080 if not os.path.isdir(dirname):
-> 1081 raise ValueError("There is no directory named '%s'", dirname)
1082
1083 if model_filename is not None:

ValueError: ("There is no directory named '%s'", 'image_classification_resnet.inference.model')

@wzzju
Copy link

wzzju commented Jun 25, 2019

根据log可以看出,您的问题首先是load时输入的维度不对,其次您提供的image_classification_resnet.inference.model这个文件夹也不存在。

@luckeriam
Copy link
Author

根据log可以看出,您的问题首先是load时输入的维度不对,其次您提供的image_classification_resnet.inference.model这个文件夹也不存在。

我是按照book 里的代码执行的,请帮忙查看

@wzzju
Copy link

wzzju commented Jun 25, 2019

根据log可以看出,您的问题首先是load时输入的维度不对,其次您提供的image_classification_resnet.inference.model这个文件夹也不存在。

我是按照book 里的代码执行的,请帮忙查看

请您提供参考的book示例的链接。

@luckeriam
Copy link
Author

@wzzju
Copy link

wzzju commented Jun 25, 2019

另外训练主循环以及过程输出
报错:
NameErrorTraceback (most recent call last)
in ()
----> 1 train_loop()

in train_loop()
34 if params_dirname is not None:
35 fluid.io.save_inference_model(params_dirname, ["pixel"],
---> 36 [predict], exe)

NameError: global name 'predict' is not defined
@shippingwang 用户还遇到的问题,请您帮忙看看哈。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants