GPU 跑03.image_classification报错,只修改了use_cuda=true;train.py跑正常
Created by: mmglove
EnforceNotMetTraceback (most recent call last)
<ipython-input-32-6590b82f66d8> in <module>()
----> 1 train_loop()
<ipython-input-31-373fd84903b7> 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
<ipython-input-30-4806cfbf43de> in train_test(program, reader)
34 avg_cost_np = test_exe.run(program=program,
35 feed=feeder_test.feed(test_data),
---> 36 fetch_list=[avg_cost, acc])
37 accumulated = [x[0] + x[1][0] for x in zip(accumulated, avg_cost_np)]
38 count += 1
/usr/local/lib/python2.7/dist-packages/paddle/fluid/executor.pyc in run(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache)
470
471 self._feed_data(program, feed, feed_var_name, scope)
--> 472 self.executor.run(program.desc, scope, 0, True, True)
473 outs = self._fetch_data(fetch_list, fetch_var_name, scope)
474 if return_numpy:
EnforceNotMet: holder_ should not be null
Tensor holds no memory. Call Tensor::mutable_data first. at [/paddle/paddle/fluid/framework/tensor.cc:22]
PaddlePaddle Call Stacks:
0 0x7f46f0ddebf2p paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int) + 482
1 0x7f46f2685f5fp paddle::framework::Tensor::check_memory_size() const + 207
2 0x7f46f0de9625p float const* paddle::framework::Tensor::data<float>() const + 21
3 0x7f46f163b73ep paddle::operators::BatchNormGradKernel<paddle::platform::CUDADeviceContext, float>::Compute(paddle::framework::ExecutionContext const&) const + 1822
4 0x7f46f163d040p std::_Function_handler<void (paddle::framework::ExecutionContext const&), paddle::framework::OpKernelRegistrarFunctor<paddle::platform::CUDAPlace, false, 0ul, paddle::operators::BatchNormGradKernel<paddle::platform::CUDADeviceContext, float>, paddle::operators::BatchNormGradKernel<paddle::platform::CUDADeviceContext, double>, paddle::operators::BatchNormGradKernel<paddle::platform::CUDADeviceContext, paddle::platform::float16> >::operator()(char const*, char const*, int) const::{lambda(paddle::framework::ExecutionContext const&)#1}>::_M_invoke(std::_Any_data const&, paddle::framework::ExecutionContext const&) + 32
5 0x7f46f2619bcap paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) const + 506
6 0x7f46f2615f4fp paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) + 447
7 0x7f46f0eb34a7p paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool) + 247
8 0x7f46f0eb3e15p paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool) + 117
9 0x7f46f0dcaaf2p
10 0x7f46f0e0739cp
11 0x4c5326p PyEval_EvalFrameEx + 37958
12 0x4b9b66p PyEval_EvalCodeEx + 774
13 0x4c17c6p PyEval_EvalFrameEx + 22758
14 0x4b9b66p PyEval_EvalCodeEx + 774
15 0x4c1f56p PyEval_EvalFrameEx + 24694
16 0x4b9b66p PyEval_EvalCodeEx + 774
17 0x4c1f56p PyEval_EvalFrameEx + 24694
18 0x4b9b66p PyEval_EvalCodeEx + 774
19 0x4bf7a2p PyEval_EvalFrameEx + 14530
20 0x4b9b66p PyEval_EvalCodeEx + 774
21 0x4c17c6p PyEval_EvalFrameEx + 22758
22 0x4b9b66p PyEval_EvalCodeEx + 774
23 0x4c17c6p PyEval_EvalFrameEx + 22758
24 0x4b9b66p PyEval_EvalCodeEx + 774
25 0x4d57a3p
26 0x4a587ep PyObject_Call + 62
27 0x4be51ep PyEval_EvalFrameEx + 9790
28 0x4b9b66p PyEval_EvalCodeEx + 774
29 0x4c1f56p PyEval_EvalFrameEx + 24694
30 0x4b9b66p PyEval_EvalCodeEx + 774
31 0x4c17c6p PyEval_EvalFrameEx + 22758
32 0x4b9b66p PyEval_EvalCodeEx + 774
33 0x4c1f56p PyEval_EvalFrameEx + 24694
34 0x4b9b66p PyEval_EvalCodeEx + 774
35 0x4c1f56p PyEval_EvalFrameEx + 24694
36 0x4b9b66p PyEval_EvalCodeEx + 774
37 0x4d57a3p
38 0x4a587ep PyObject_Call + 62
39 0x4be51ep PyEval_EvalFrameEx + 9790
40 0x4b9b66p PyEval_EvalCodeEx + 774
41 0x4d57a3p
42 0x4a587ep PyObject_Call + 62
43 0x4be51ep PyEval_EvalFrameEx + 9790
44 0x4b9b66p PyEval_EvalCodeEx + 774
45 0x4c1f56p PyEval_EvalFrameEx + 24694
46 0x4b9b66p PyEval_EvalCodeEx + 774
47 0x4c1f56p PyEval_EvalFrameEx + 24694
48 0x4b9b66p PyEval_EvalCodeEx + 774
49 0x4c1f56p PyEval_EvalFrameEx + 24694
50 0x4b9b66p PyEval_EvalCodeEx + 774
51 0x4d57a3p
52 0x4a587ep PyObject_Call + 62
53 0x4be51ep PyEval_EvalFrameEx + 9790
54 0x4b9b66p PyEval_EvalCodeEx + 774
55 0x4d5669p
56 0x4a587ep PyObject_Call + 62
57 0x53a183p
58 0x4c166dp PyEval_EvalFrameEx + 22413
59 0x4b9b66p PyEval_EvalCodeEx + 774
60 0x4c1f56p PyEval_EvalFrameEx + 24694
61 0x4b9b66p PyEval_EvalCodeEx + 774
62 0x4c1f56p PyEval_EvalFrameEx + 24694
63 0x4b9b66p PyEval_EvalCodeEx + 774
64 0x4c1f56p PyEval_EvalFrameEx + 24694
65 0x4b9b66p PyEval_EvalCodeEx + 774
66 0x4c17c6p PyEval_EvalFrameEx + 22758
67 0x4b9b66p PyEval_EvalCodeEx + 774
68 0x4bf7a2p PyEval_EvalFrameEx + 14530
69 0x4b9b66p PyEval_EvalCodeEx + 774
70 0x4c17c6p PyEval_EvalFrameEx + 22758
71 0x4b9b66p PyEval_EvalCodeEx + 774
72 0x4d5669p
73 0x4a587ep PyObject_Call + 62
74 0x51a866p
75 0x4939ccp Py_Main + 1612
76 0x7f47b97e3830p __libc_start_main + 240
77 0x493299p _start + 41