title: variable size of input for CNN model in text classification?
body: <p>I implemented the CNN model for text classification based on this <a href="http://www.aclweb.org/anthology/D14-1181" rel="nofollow noreferrer">paper</a>. Since the CNN can only deal with the sentences that have fixed size, so I set the size of input as max length of sentence in my dataset and zero padding the short sentence. But for my understanding, no matter how long the input sentence is, the max pooling strategy will always extract only one value for each filter map. So it doesn't matter the size of input sentence is long or short, because after filter convoluted/pooled, the output will be the same size. In this case, why should I zero padding all the short sentence into the fixed size?</p>
  
  <p>For example, my code for feeding data into the CNN model is <code>self.input_data = tf.placeholder(tf.int32,[None,max_len],name="input_data")</code>, can I do not specify <code>max_len</code>, and using the <code>None value</code> which is based on the length of current training sentence?</p>
  
  <p>In addition, I was wondering is there any other new approach that can solve the variable input for CNN model. I also found the other <a href="http://www.aclweb.org/anthology/P14-1062" rel="nofollow noreferrer">paper</a> that can solve this problem, but for my understanding, it only used k values for max-pooling instead of 1 value of max-pooling, which can deal with variable sentence? How?</p>