class_docstr: A CNN encoder with word embedding.
  
  This model encodes a sentence as a set of n-gram chunks
  using convolutional filters.
  Following the convolution, max-pooling is applied over time.
  Finally, the output is fed into a multilayer perceptron.
  
  Args:
      n_layers (int): The number of layers of MLP.
      n_vocab (int): The size of vocabulary.
      n_units (int): The number of units of MLP and word embedding.
      dropout (float): The dropout ratio.
code: def __init__(self, n_layers, n_vocab, n_units, dropout=0.1):
      out_units = n_units // 3
      super(CNNEncoder, self).__init__()
      with self.init_scope():
          self.embed = L.EmbedID(
              n_vocab, n_units, ignore_label=-1, initialW=embed_init
          )
          self.cnn_w3 = L.Convolution2D(
              n_units,
              out_units,
              ksize=(3, 1),
              stride=1,
              pad=(2, 0),
              nobias=True,
          )
          self.cnn_w4 = L.Convolution2D(
              n_units,
              out_units,
              ksize=(4, 1),
              stride=1,
              pad=(3, 0),
              nobias=True,
          )
          self.cnn_w5 = L.Convolution2D(
              n_units,
              out_units,
              ksize=(5, 1),
              stride=1,
              pad=(4, 0),
              nobias=True,
          )
          self.mlp = MLP(n_layers, out_units * 3, dropout)
  
      self.out_units = out_units * 3
      self.dropout = dropout
  
imports: import numpy
  import chainer
  import chainer.functions
  import chainer.links
  from chainer import reporter
label_desc: Use image node_id 1 to create a new CNNEncoder object from inherited base classes: chainer with example: obj = CNNEncoder(n_layers, n_vocab, n_units, dropout)