dennybritz / cnn-text-classification-tf

Convolutional Neural Network for Text Classification in Tensorflow
Apache License 2.0
5.64k stars 2.77k forks source link

size of maxpooling #184

Closed yongzhuo closed 5 years ago

yongzhuo commented 5 years ago

why ksize of maxpooling of textcnn is [1, self.sentence_size - filter_size + 1, 1, 1],what I mind is "sentence_size - filter_size + 1", can it be sentence_size, filter_size or any others, is there any tricks? I couldn't see it in paper.

lpq29743 commented 5 years ago

Since the convolutional layer of CNN use the "VALID" padding, the dimension of the convolutional output is "sentence_size - filter_size + 1". That's why use "sentence_size - filter_size + 1".

yongzhuo commented 5 years ago

ok, thanks!