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

Update model.py #34

Closed
wants to merge 2 commits into from
Closed

Update model.py #34

wants to merge 2 commits into from

Conversation

guochaorong
Copy link
Contributor

请yuyang,jiayi老师帮忙看个问题

@guochaorong
Copy link
Contributor Author

报错信息:
File "/root/.jumbo/lib/python2.7/site-packages/paddle/fluid/parallel_executor.py", line 238, in run
self.executor.run(fetch_list, fetch_var_name)
paddle.fluid.core.EnforceNotMet: enforce in_dims.size() == filter_dims.size() failed, 4 != 1

@@ -202,19 +202,19 @@ def run_benchmark(model, args):
else:
dshape = [224, 224, 3]

input = fluid.layers.data(name='data', shape=dshape, dtype='float32')
image = fluid.layers.data(name='image', shape=dshape, dtype='float32')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it because the data name is changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里只是个符号? 我们在模型代码似乎没用到这个变量? 我看其他模型写的image, 我想保持统一

@@ -241,24 +249,21 @@ def test(exe):
y_data = np.array(map(lambda x: x[1], data)).astype("int64")
y_data = y_data.reshape([-1, 1])

acc, weight = exe.run(inference_program,
acc, weight = test_exe.run(inference_program,
feed={"data": img_data,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name here is 'data'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

恩恩, 还没调到这里, 先忽略这里把。。。。 主要是297 train 那儿


place = core.CPUPlace() if args.device == 'CPU' else core.CUDAPlace(0)
exe = fluid.Executor(place)
#exe.run(fluid.default_startup_program())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why deleted

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

似乎是这儿的问题。。。这个错误输出把我给迷惑了。
谢谢潘老师

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

Successfully merging this pull request may close these issues.

2 participants