执行finetune_and_eval()报这个错是何故
Created by: chenfengshf
---------------------------------------------------------------------------EnforceNotMet Traceback (most recent call last) in ----> 1 cls_task.finetune_and_eval() /opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddlehub/finetune/task.py in finetune_and_eval(self) 504 505 def finetune_and_eval(self): --> 506 return self.finetune(do_eval=True) 507 508 def finetune(self, do_eval=False): /opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddlehub/finetune/task.py in finetune(self, do_eval) 514 if self.current_epoch <= self.config.num_epoch: 515 while self.current_epoch <= self.config.num_epoch: --> 516 run_states = self.run(do_eval=do_eval) 517 self.env.current_epoch += 1 518 /opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddlehub/finetune/task.py in run(self, do_eval) 553 def run(self, do_eval=False): 554 with fluid.program_guard(self.main_program, self.startup_program): --> 555 if self.config.use_pyreader: 556 return self.run_with_py_reader(do_eval=do_eval) 557 return self.run_with_data_feeder(do_eval=do_eval) /opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddlehub/finetune/task.py in run_with_data_feeder(self, do_eval) 574 575 fetch_result = self.exe.run( --> 576 self.main_program_to_be_run, 577 feed=data_feeder.feed(batch), 578 fetch_list=self.fetch_list) /opt/conda/envs/python35-paddle120-env/lib/python3.5/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) 649 scope=scope, 650 return_numpy=return_numpy, --> 651 use_program_cache=use_program_cache) 652 else: 653 if fetch_list and program.is_data_parallel and program.program and ( /opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddle/fluid/executor.py in run(self, program, exe, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache) 747 self.feed_data(program, feed, feed_var_name, scope) 748 if not use_program_cache: --> 749 exe.run(program.desc, scope, 0, True, True, fetch_var_name) 750 else: 751 exe.run_cached_prepared_ctx(ctx, scope, False, False, False) EnforceNotMet: Invoke operator increment error. Python Callstacks: File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddle/fluid/framework.py", line 1842, in prepend_op attrs=kwargs.get("attrs", None)) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddle/fluid/layers/nn.py", line 6699, in autoincreased_step_counter stop_gradient=True) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddle/fluid/layers/learning_rate_scheduler.py", line 46, in decay_step_counter counter_name='@LR_DECAY_COUNTER@', begin=begin, step=1) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddlehub/finetune/optimization.py", line 97, in linear_warmup_decay global_step = lr_scheduler.decay_step_counter() File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddlehub/finetune/optimization.py", line 53, in adam_weight_decay_optimization warmup_steps, main_program) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddlehub/finetune/strategy.py", line 134, in execute main_program, self.weight_decay, self.lr_scheduler) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddlehub/finetune/task.py", line 246, in build_env self.loss, self.base_data_reader, self.config) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddlehub/finetune/task.py", line 333, in main_program self.build_env() File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddlehub/finetune/task.py", line 489, in load_checkpoint main_program=self.main_program) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddlehub/finetune/task.py", line 168, in init_if_necessary if not self.load_checkpoint(): File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddlehub/finetune/task.py", line 511, in finetune self.init_if_necessary() File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/paddlehub/finetune/task.py", line 506, in finetune_and_eval return self.finetune(do_eval=True) File "", line 1, in cls_task.finetune_and_eval() File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 3265, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 3189, in run_ast_nodes if (yield from self.run_code(code, result)): File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 3018, in run_cell_async interactivity=interactivity, compiler=compiler, result=result) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/IPython/core/async_helpers.py", line 67, in pseudo_sync_runner coro.send(None) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 2843, in run_cell return runner(coro) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 2817, in run_cell raw_cell, store_history, silent, shell_futures) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/ipykernel/zmqshell.py", line 536, in run_cell return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/ipykernel/ipkernel.py", line 294, in do_execute res = shell.run_cell(code, store_history=store_history, silent=silent) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/tornado/gen.py", line 326, in wrapper yielded = next(result) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 534, in execute_request user_expressions, allow_stdin, File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/tornado/gen.py", line 326, in wrapper yielded = next(result) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 267, in dispatch_shell yield gen.maybe_future(handler(stream, idents, msg)) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/tornado/gen.py", line 326, in wrapper yielded = next(result) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 357, in process_one yield gen.maybe_future(dispatch(*args)) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/tornado/gen.py", line 1147, in run yielded = self.gen.send(value) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/tornado/gen.py", line 1233, in inner self.run() File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/tornado/stack_context.py", line 300, in null_wrapper return fn(args, kwargs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/tornado/ioloop.py", line 758, in _run_callback ret = callback() File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/asyncio/events.py", line 127, in _run self._callback(self._args) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/asyncio/base_events.py", line 1425, in _run_once handle._run() File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/asyncio/base_events.py", line 421, in run_forever self._run_once() File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/tornado/platform/asyncio.py", line 132, in start self.asyncio_loop.run_forever() File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/ipykernel/kernelapp.py", line 505, in start self.io_loop.start() File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/traitlets/config/application.py", line 658, in launch_instance app.start() File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/site-packages/ipykernel_launcher.py", line 16, in app.launch_new_instance() File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/opt/conda/envs/python35-paddle120-env/lib/python3.5/runpy.py", line 193, in _run_module_as_main "main", mod_spec) C++ Callstacks: Input X(0) is not initialized at [/paddle/paddle/fluid/framework/operator.cc:1146] PaddlePaddle Call Stacks: 0 0x7fa5df068750p void paddle::platform::EnforceNotMet::Init<char const>(char const, char const, int) + 352 1 0x7fa5df068ac9p paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const, int) + 137 2 0x7fa5e0fcb2bfp paddle::framework::OperatorWithKernel::IndicateDataType(paddle::framework::ExecutionContext const&) const + 1343 3 0x7fa5e0fcb4afp paddle::framework::OperatorWithKernel::GetExpectedKernelType(paddle::framework::ExecutionContext const&) const + 47 4 0x7fa5df669fa8p paddle::operators::IncrementOp::GetExpectedKernelType(paddle::framework::ExecutionContext const&) const + 40 5 0x7fa5e0fccd6bp paddle::framework::OperatorWithKernel::ChooseKernel(paddle::framework::RuntimeContext const&, 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 + 235 6 0x7fa5e0fceed8p 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&, paddle::framework::RuntimeContext*) const + 728 7 0x7fa5e0fcf151p 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 + 529 8 0x7fa5e0fcc74cp 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&) + 332 9 0x7fa5df1f354ep paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool) + 382 10 0x7fa5df1f65efp paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool, std::vector<std::string, std::allocatorstd::string > const&, bool) + 143 11 0x7fa5df059dddp 12 0x7fa5df09b066p 13 0x7fa6634b6199p PyCFunction_Call + 233 14 0x7fa6635513f9p PyEval_EvalFrameEx + 33545 15 0x7fa6635534b6p 16 0x7fa6635505b5p PyEval_EvalFrameEx + 29893 17 0x7fa6635534b6p 18 0x7fa6635505b5p PyEval_EvalFrameEx + 29893 19 0x7fa6635534b6p 20 0x7fa6635505b5p PyEval_EvalFrameEx + 29893 21 0x7fa6635534b6p 22 0x7fa6635505b5p PyEval_EvalFrameEx + 29893 23 0x7fa6635534b6p 24 0x7fa6635505b5p PyEval_EvalFrameEx + 29893 25 0x7fa6635511d0p PyEval_EvalFrameEx + 32992 26 0x7fa6635534b6p 27 0x7fa6635535a8p PyEval_EvalCodeEx + 72 28 0x7fa6635535ebp PyEval_EvalCode + 59 29 0x7fa663546c5dp 30 0x7fa6634b6179p PyCFunction_Call + 201 31 0x7fa663550dbep PyEval_EvalFrameEx + 31950 32 0x7fa66348a410p _PyGen_Send + 128 33 0x7fa66354f953p PyEval_EvalFrameEx + 26723 34 0x7fa66348a410p _PyGen_Send + 128 35 0x7fa66354f953p PyEval_EvalFrameEx + 26723 36 0x7fa66348a410p _PyGen_Send + 128 37 0x7fa663550d60p PyEval_EvalFrameEx + 31856 38 0x7fa6635511d0p PyEval_EvalFrameEx + 32992 39 0x7fa6635511d0p PyEval_EvalFrameEx + 32992 40 0x7fa6635534b6p 41 0x7fa6635535a8p PyEval_EvalCodeEx + 72 42 0x7fa663492c33p 43 0x7fa66346133ap PyObject_Call + 106 44 0x7fa66354b6eep PyEval_EvalFrameEx + 9726 45 0x7fa6635534b6p 46 0x7fa6635505b5p PyEval_EvalFrameEx + 29893 47 0x7fa6634896bap 48 0x7fa663544af6p 49 0x7fa6634b6179p PyCFunction_Call + 201 50 0x7fa663550dbep PyEval_EvalFrameEx + 31950 51 0x7fa6635534b6p 52 0x7fa6635505b5p PyEval_EvalFrameEx + 29893 53 0x7fa6634896bap 54 0x7fa663544af6p 55 0x7fa6634b6179p PyCFunction_Call + 201 56 0x7fa663550dbep PyEval_EvalFrameEx + 31950 57 0x7fa6635534b6p 58 0x7fa6635505b5p PyEval_EvalFrameEx + 29893 59 0x7fa6634896bap 60 0x7fa663544af6p 61 0x7fa6634b6179p PyCFunction_Call + 201 62 0x7fa663550dbep PyEval_EvalFrameEx + 31950 63 0x7fa6635534b6p 64 0x7fa6635535a8p PyEval_EvalCodeEx + 72 65 0x7fa663492b56p 66 0x7fa66346133ap PyObject_Call + 106 67 0x7fa66354b6eep PyEval_EvalFrameEx + 9726 68 0x7fa66348a410p _PyGen_Send + 128 69 0x7fa663550d60p PyEval_EvalFrameEx + 31856 70 0x7fa6635511d0p PyEval_EvalFrameEx + 32992 71 0x7fa6635534b6p 72 0x7fa6635535a8p PyEval_EvalCodeEx + 72 73 0x7fa663492c33p 74 0x7fa66346133ap PyObject_Call + 106 75 0x7fa66354b6eep PyEval_EvalFrameEx + 9726 76 0x7fa6635534b6p 77 0x7fa6635535a8p PyEval_EvalCodeEx + 72 78 0x7fa663492b56p 79 0x7fa66346133ap PyObject_Call + 106 80 0x7fa6635c6ccap 81 0x7fa66346133ap PyObject_Call + 106 82 0x7fa66354d4c5p PyEval_EvalFrameEx + 17365 83 0x7fa6635534b6p 84 0x7fa6635535a8p PyEval_EvalCodeEx + 72 85 0x7fa663492b56p 86 0x7fa66346133ap PyObject_Call + 106 87 0x7fa66354b6eep PyEval_EvalFrameEx + 9726 88 0x7fa6635511d0p PyEval_EvalFrameEx + 32992 89 0x7fa6635511d0p PyEval_EvalFrameEx + 32992 90 0x7fa6635511d0p PyEval_EvalFrameEx + 32992 91 0x7fa6635511d0p PyEval_EvalFrameEx + 32992 92 0x7fa6635511d0p PyEval_EvalFrameEx + 32992 93 0x7fa6635534b6p 94 0x7fa6635505b5p PyEval_EvalFrameEx + 29893 95 0x7fa6635534b6p 96 0x7fa6635535a8p PyEval_EvalCodeEx + 72 97 0x7fa6635535ebp PyEval_EvalCode + 59 98 0x7fa663546c5dp 99 0x7fa6634b6179p PyCFunction_Call + 201