sequence_pool meet LoD Level unmatch error
Created by: alz95
my code was like:
pyreader = fluid.layers.py_reader( capacity=50, shapes=[[-1, max_seq_len, 1], [-1, max_seq_len, 1], [-1, max_seq_len, 1], [-1, max_seq_len, 1], [-1, max_seq_len, 1], [-1, 1], [-1, 1]], dtypes=[ 'int64', 'int64', 'int64', 'int64', 'float32', 'int64', 'int64' ], lod_levels=[0, 0, 0, 0, 0, 0, 0], name=task_name + "_" + pyreader_name, use_double_buffer=True) (src_ids, sent_ids, pos_ids, task_ids, input_mask, labels, qids) = fluid.layers.read_file(pyreader)
qt_emb = fluid.layers.embedding( input=src_ids, is_sparse=False, size=[18000, 16], param_attr=fluid.ParamAttr(name='vocab_embedding', initializer=fluid.initializer.Uniform())) qt_embed_sum = fluid.layers.sequence_pool(qt_emb, pool_type='sum')
when i run it, i have these error message:
Error: The LoD level Input(X) of sequence_pool should be larger than 0. [Hint: Expected in_lod_level > 0, but received in_lod_level:0 <= 0:0.] at (/home/teamcity/buildAgent/work/1ec40e2d88fa641/paddle/fluid/operators/sequence_ops/sequence_pool_op.cc:37) [operator < sequence_pool > error]