Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

网络加dropout出错

Open AWSWXY opened this issue 7 years ago • 2 comments

Traceback (most recent call last): File "script/train.py", line 290, in train(args) File "script/train.py", line 232, in train train_loop(args, args.train_data_path, train_file_list, main_program, args.test_data_path, test_file_list, test_program, py_reader, loss, acc, auc_var, batch_auc_var, scale_infer,1, 0,data_list) File "script/train.py", line 151, in train_loop eval_test(exe, test_program, pass_id, batch_id, args.batch_size,test_file_path,test_file_list,loss,auc_var,batch_auc_var, scale_infer, data_list,place) File "script/train.py", line 80, in eval_test fetch_list=[loss.name, auc_var.name, batch_auc_var.name]) File "/home/disk6/xinyu/.jumbo/lib/python2.7/site-packages/paddle/fluid/executor.py", line 565, in run use_program_cache=use_program_cache) File "/home/disk6/xinyu/.jumbo/lib/python2.7/site-packages/paddle/fluid/executor.py", line 642, in run exe.run(program.desc, scope, 0, True, True, fetch_var_name) paddle.fluid.core.EnforceNotMet: Invoke operator dropout_grad error. Python Callstacks: File "/home/disk6/xinyu/.jumbo/lib/python2.7/site-packages/paddle/fluid/framework.py", line 1654, in append_op attrs=kwargs.get("attrs", None)) File "/home/disk6/xinyu/.jumbo/lib/python2.7/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op return self.main_program.current_block().append_op(args, kwargs) File "/home/disk6/xinyu/.jumbo/lib/python2.7/site-packages/paddle/fluid/layers/nn.py", line 1397, in dropout 'dropout_implementation': dropout_implementation, File "/home/disk6/xinyu/dev/intent_paddle_cloud/script/network_conf.py", line 55, in mynet usr_combined_features = fluid.layers.dropout(x=usr_combined_features, dropout_prob=0.3) File "script/train.py", line 215, in train loss, acc, auc_var ,batch_auc_var, scale_infer, py_reader, data_list = mynet(user_fea_dim, query_fea_dim) File "script/train.py", line 290, in train(args) C++ Callstacks: Input Mask(0)is not initialized at [/paddle/paddle/fluid/framework/operator.cc:1109] PaddlePaddle Call Stacks: 0 0x7f629e109200p void paddle::platform::EnforceNotMet::Init<char const>(char const, char const, int) + 352 1 0x7f629e109579p paddle::platform::EnforceNotMet::EnforceNotMet(std::exception_ptr::exception_ptr, char const*, int) + 137 2 0x7f629f2b4f1fp paddle::framework::OperatorWithKernel::IndicateDataType(paddle::framework::ExecutionContext const&) const + 1343 3 0x7f629f2b510fp paddle::framework::OperatorWithKernel::GetExpectedKernelType(paddle::framework::ExecutionContext const&) const + 47 4 0x7f629f2b74f3p 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 + 243 5 0x7f629f2b8194p 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 + 292 6 0x7f629f2b636bp 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&) + 267 7 0x7f629e270b7ep paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool) + 158 8 0x7f629e273b5fp paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool, std::vector<std::string, std::allocatorstd::string > const&, bool) + 143 9 0x7f629e0f9faep 10 0x7f629e138fcep 11 0x7f6312f9f414p PyEval_EvalFrameEx + 25956 12 0x7f6312fa0160p PyEval_EvalCodeEx + 2240 13 0x7f6312f9e4d1p PyEval_EvalFrameEx + 22049 14 0x7f6312fa0160p PyEval_EvalCodeEx + 2240 15 0x7f6312f9e4d1p PyEval_EvalFrameEx + 22049 16 0x7f6312fa0160p PyEval_EvalCodeEx + 2240 17 0x7f6312f9e4d1p PyEval_EvalFrameEx + 22049 18 0x7f6312fa0160p PyEval_EvalCodeEx + 2240 19 0x7f6312f9e4d1p PyEval_EvalFrameEx + 22049 20 0x7f6312fa0160p PyEval_EvalCodeEx + 2240 21 0x7f6312f9e4d1p PyEval_EvalFrameEx + 22049 22 0x7f6312fa0160p PyEval_EvalCodeEx + 2240 23 0x7f6312fa0272p PyEval_EvalCode + 50 24 0x7f6312fba65cp 25 0x7f6312fba730p PyRun_FileExFlags + 144 26 0x7f6312fbbc3cp PyRun_SimpleFileExFlags + 220 27 0x7f6312fcd4fcp Py_Main + 3164 28 0x7f631220c84dp __libc_start_main + 253 29 0x400699p

AWSWXY avatar Jun 04 '19 05:06 AWSWXY

不加dropout 不报错

AWSWXY avatar Jun 04 '19 05:06 AWSWXY

测试的时候需要把fluid.default_main_program().clone(for_Test=True)放在optimizer之前

ceci3 avatar Jun 04 '19 08:06 ceci3