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

图像分类的代码运行到训练部分报错 #856

Open
luckeriam opened this issue May 29, 2020 · 3 comments
Open

图像分类的代码运行到训练部分报错 #856

luckeriam opened this issue May 29, 2020 · 3 comments
Assignees

Comments

@luckeriam
Copy link

代码:train_loop()

报错信息:


RuntimeError Traceback (most recent call last)
in
----> 1 train_loop()

in train_loop()
28
29 avg_cost_test, accuracy_test = train_test(test_program,
---> 30 reader=test_reader)
31 plot_cost.append(test_prompt, step, avg_cost_test)
32

in train_test(program, reader)
32 avg_cost_np = test_exe.run(program=program,
33 feed=feeder_test.feed(test_data),
---> 34 fetch_list=[avg_cost, acc])
35 accumulated = [x[0] + x[1][0] for x in zip(accumulated, avg_cost_np)]
36 count += 1

/opt/conda/lib/python3.6/site-packages/paddle/fluid/executor.py in run(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache)
781 warnings.warn(
782 "The following exception is not an EOF exception.")
--> 783 six.reraise(*sys.exc_info())
784
785 def _run_impl(self, program, feed, fetch_list, feed_var_name,

/opt/conda/lib/python3.6/site-packages/six.py in reraise(tp, value, tb)
691 if value.traceback is not tb:
692 raise value.with_traceback(tb)
--> 693 raise value
694 finally:
695 value = None

/opt/conda/lib/python3.6/site-packages/paddle/fluid/executor.py in run(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache)
776 scope=scope,
777 return_numpy=return_numpy,
--> 778 use_program_cache=use_program_cache)
779 except Exception as e:
780 if not isinstance(e, core.EOFException):

/opt/conda/lib/python3.6/site-packages/paddle/fluid/executor.py in _run_impl(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache)
829 scope=scope,
830 return_numpy=return_numpy,
--> 831 use_program_cache=use_program_cache)
832
833 program._compile(scope, self.place)

/opt/conda/lib/python3.6/site-packages/paddle/fluid/executor.py in _run_program(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache)
903 if not use_program_cache:
904 self._default_executor.run(program.desc, scope, 0, True, True,
--> 905 fetch_var_name)
906 else:
907 self._default_executor.run_prepared_ctx(ctx, scope, False, False,

RuntimeError: boost::bad_get: failed value get using boost::get
Gather

@wanghaoshuang
Copy link

您好,能麻烦您贴一下完整代码么?

@luckeriam
Copy link
Author

@wanghaoshuang
Copy link

请问您用的paddle版本是?我来尝试复现下这个问题。

@wanghaoshuang wanghaoshuang self-assigned this Jun 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants