Invoke operator lod_tensor_to_array error
Created by: jinxing94
模型不用optimizer能输出loss, 加上optimizer报错,错误信息如下,求问原因。
exe.run(program.desc, scope, 0, True, True, fetch_var_name) paddle.fluid.core_avx.EnforceNotMet: Invoke operator lod_tensor_to_array error.
C++ Callstacks: Enforce failed. Expected rank_level < x.lod().size(), but received rank_level:0 >= x.lod().size():0. Input should be a LOD tensor, and size is at least 1 at [/paddle/paddle/fluid/operators/lod_tensor_to_array_op.cc:111] PaddlePaddle Call Stacks: 0 0x7f69bbf72c88p void paddle::platform::EnforceNotMet::Initstd::string(std::string, char const*, int) + 360 1 0x7f69bbf72fd7p paddle::platform::EnforceNotMet::EnforceNotMet(std::string const&, char const*, int) + 87 2 0x7f69bc2b04e4p paddle::operators::LoDTensorToArrayOp::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 + 4916 3 0x7f69bded67dcp 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 4 0x7f69bc0fd55ep paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool) + 382 5 0x7f69bc1005ffp paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool, std::vector<std::string, std::allocatorstd::string > const&, bool) + 143 6 0x7f69bbf63dedp 7 0x7f69bbfa5076p 8 0x7f6a27c24a02p _PyCFunction_FastCallDict + 386 9 0x7f6a27cb5cb8p 10 0x7f6a27cb8607p _PyEval_EvalFrameDefault + 8023 11 0x7f6a27cb5b54p 12 0x7f6a27cb5e07p 13 0x7f6a27cb93d9p _PyEval_EvalFrameDefault + 11561 14 0x7f6a27cb5b54p 15 0x7f6a27cb5e07p 16 0x7f6a27cb93d9p _PyEval_EvalFrameDefault + 11561 17 0x7f6a27cb5b54p 18 0x7f6a27cb5e07p 19 0x7f6a27cb8607p _PyEval_EvalFrameDefault + 8023 20 0x7f6a27cb5b54p 21 0x7f6a27cb612fp PyEval_EvalCodeEx + 47 22 0x7f6a27cb615bp PyEval_EvalCode + 27 23 0x7f6a27ce95b2p PyRun_FileExFlags + 178 24 0x7f6a27ce9726p PyRun_SimpleFileExFlags + 230 25 0x7f6a27d05d02p Py_Main + 3730 26 0x400ae2p main + 370 27 0x38bfc21b45p __libc_start_main + 245 28 0x400b9dp