训练deep attention matching net报错
Created by: bmapwei
----------- Configuration Arguments ----------- EOS: 28270 batch_size: 256 channel1_num: 32 channel2_num: 16 data_path: ./data/data.pkl emb_size: 200 ext_eval: False learning_rate: 0.001 max_turn_len: 50 max_turn_num: 9 num_scan_data: 2 save_path: ./models stack_num: 5 use_cuda: True vocab_size: 434512 word_emb_init: ./data/word_embedding.pkl
Traceback (most recent call last): File "../train_and_evaluate.py", line 269, in train(args) File "../train_and_evaluate.py", line 120, in train loss, logits = dam.create_network() File "/home/map/xiehongwei/models-develop/fluid/models-develop/fluid/deep_attention_matching_net/model.py", line 61, in create_network initializer=fluid.initializer.Normal(scale=0.1))) File "/home/map/.jumbo/lib/python2.7/site-packages/paddle/fluid/layers/nn.py", line 255, in embedding 'padding_idx': padding_idx File "/home/map/.jumbo/lib/python2.7/site-packages/paddle/fluid/layer_helper.py", line 46, in append_op return self.main_program.current_block().append_op(*args, kwargs) File "/home/map/.jumbo/lib/python2.7/site-packages/paddle/fluid/framework.py", line 862, in append_op op = Operator(block=self, desc=op_desc, args, kwargs) File "/home/map/.jumbo/lib/python2.7/site-packages/paddle/fluid/framework.py", line 516, in init self.desc.infer_shape(self.block.desc) paddle.fluid.core.EnforceNotMet: enforce ids_dims.size() == 2 failed, 3 != 2 at [/paddle/paddle/fluid/operators/lookup_table_op.cc:43] PaddlePaddle Call Stacks: 0 0x7f1dcb93fce2p paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const, int) + 482 1 0x7f1dcc04b153p paddle::operators::LookupTableOp::InferShape(paddle::framework::InferShapeContext) const + 2195 2 0x7f1dcb9be017p paddle::framework::OpDesc::InferShape(paddle::framework::BlockDesc const&) const + 903 3 0x7f1dcb995169p ZZN8pybind1112cpp_function10initializeIZNS0_C1IvN6paddle9framework6OpDescEIRKNS4_9BlockDescEEINS_4nameENS_9is_methodENS_7siblingEEEEMT0_KFT_DpT1_EDpRKT2_EUlPKS5_S8_E_vISN_S8_EIS9_SA_SB_EEEvOSD_PFSC_SF_ESL_ENUlRNS_6detail13function_callEE1_4_FUNESU + 201 4 0x7f1dcb950932p pybind11::cpp_function::dispatcher(_object, _object, _object) + 2338 5 0x7f1e2576d3d4p PyEval_EvalFrameEx + 25956 6 0x7f1e2576e120p PyEval_EvalCodeEx + 2240 7 0x7f1e256fa26dp 8 0x7f1e256d20e3p PyObject_Call + 83 9 0x7f1e256e4f6fp 10 0x7f1e256d20e3p PyObject_Call + 83 11 0x7f1e257287fep 12 0x7f1e25727468p 13 0x7f1e256d20e3p PyObject_Call + 83 14 0x7f1e2576add7p PyEval_EvalFrameEx + 16231 15 0x7f1e2576e120p PyEval_EvalCodeEx + 2240 16 0x7f1e256fa26dp 17 0x7f1e256d20e3p PyObject_Call + 83 18 0x7f1e2576add7p PyEval_EvalFrameEx + 16231 19 0x7f1e2576e120p PyEval_EvalCodeEx + 2240 20 0x7f1e2576c491p PyEval_EvalFrameEx + 22049 21 0x7f1e2576e120p PyEval_EvalCodeEx + 2240 22 0x7f1e2576c491p PyEval_EvalFrameEx + 22049 23 0x7f1e2576cc46p PyEval_EvalFrameEx + 24022