sequence_conv报错:Error: Input(X, Filter) should be 2-D tensor.
Created by: lliqi-echo
输入数据为:seq = fluid.layers.data(name='seq', shape=[1], dtype='int64',lod_level=1) 使用文本CNN def cnn(data, input_dim=4, emb_dim=128, hid_dim=512): emb = fluid.embedding( input=data, size=[input_dim, emb_dim], is_sparse=True) conv_3 = fluid.nets.sequence_conv_pool( input=emb, num_filters=hid_dim, filter_size=4, act="tanh", pool_type="sqrt") conv_4 = fluid.nets.sequence_conv_pool( input=emb, num_filters=hid_dim, filter_size=4, act="tanh", pool_type="sqrt") prediction = fluid.layers.fc( input=[conv_3, conv_4], size=2, act="softmax") return prediction 训练过程提示sequence_conv报错,Error: Input(X, Filter) should be 2-D tensor.