title: what is the kind of max pooling in this nlp questionhierarchy description
body: <p>I'm trying to implement this description and that what I did
  I generated uni_gram &amp; bi_gram &amp; tri_gram of shape(?,15,512) "using padding "
  &amp; then for each word I concatenate the three feature vector (?,3,512)
  and then I apply to them Globalmaxpooling1D I do not know if I implemented it well or not so can any one help me ?</p>
  
  <p><a href="https://i.stack.imgur.com/DAkKR.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DAkKR.jpg" alt="enter image description here"></a></p>
  
  
  
  <pre class="lang-python prettyprint-override"><code>Q = Input(shape=(15,))
  V = Input(shape=(512,196))
  
  word_level = Embedding ( vocab_size , 512 , input_length=max_length)(Q)
  
  uni_gram = Conv1D( 512 , kernel_size = 1 , activation='tanh' , 
  padding='same' )(word_level)
  bi_gram  = Conv1D( 512 , kernel_size = 2 , activation='tanh' , 
  padding='same' )(word_level)
  tri_gram = Conv1D( 512 , kernel_size = 3 , activation='tanh' , 
  padding='same' )(word_level)
  
  phrases = []
  
  for w in range(0,max_length):
  
  Uni =uni_gram [:,w,:]
  Uni= tf.reshape(Uni , [-1,1,512 ])
  
  Bi = bi_gram [:,w,:]
  Bi = tf.reshape(Bi , [-1,1,512 ])
  
  Tri= tri_gram [:,w,:]
  Tri = tf.reshape( Tri , [-1,1,512 ])
  
  Uni_Bi_Tri  =  Concatenate(axis=1)([ Uni, Bi , Tri ])
  Best_phrase = GlobalMaxPooling1D()(Uni_Bi_Tri)
  Best_phrase = tf.reshape( Best_phrase , [-1,1,512 ])
  phrases.append(Best_phrase)
  </code></pre>