<p>Quick answer:</p>

<p>No you can't</p>

<p>Longer answer:</p>

<p>Pooling is like a reduce function. Applying it on a layer reduces the dimensions. But different input shapes don't produce the same output shapes. However with zero padding you can probably simulate this, with max_len we are doing this. So, in the second paper, the idea is to have a dynamic computational graph. It is not the same thing as before. It is basically creating several networks with different depths (depending on their input size). The generalized version for encoder-decoder architecture is called <a href="https://arxiv.org/abs/1610.10099" rel="nofollow noreferrer">bytenet</a></p>
variable size of input for CNN model in text classification?
<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>