LopezGG/NN_NER_tensorFlow

is the second dimension of ksize in max pooling wrong?

ERnest666 opened this issue · 0 comments

pooled = tf.nn.max_pool(
h_expand,
ksize=[1,sequence_length * max_char_per_word,1, 1],
strides=[1, max_char_per_word, 1, 1],
padding='SAME',
name="pooled")

I'm confused about the second dimension of ksize, which covers all characters in one sentence . According to the paper, as what I have understand, the filter of max pooling should cover characters in one word once rather than in the whole sentence. So I think it should be changed to "ksize=[1, max_char_per_word, 1, 1]" and I think the original code would generate same character representation for each word in a sentence (I have tested this part with small examples). I'm not sure if I misunderstand something here, what do you think?