class_docstr: A classifier using a given encoder.
  
  This chain encodes a sentence and classifies it into classes.
  
  Args:
      encoder (Link): A callable encoder, which extracts a feature.
          Input is a list of variables whose shapes are
          "(sentence_length, )".
          Output is a variable whose shape is "(batchsize, n_units)".
      n_class (int): The number of classes to be predicted.
code: def forward(self, xs, ys):
      concat_outputs = self.predict(xs)
      concat_truths = F.concat(ys, axis=0)
  
      loss = F.softmax_cross_entropy(concat_outputs, concat_truths)
      accuracy = F.accuracy(concat_outputs, concat_truths)
      reporter.report({"loss": loss}, self)
      reporter.report({"accuracy": accuracy}, self)
      return loss
  
imports: import numpy
  import chainer
  import chainer.functions
  import chainer.links
  from chainer import reporter
label_desc: Use image node_id 2 for calling the TextClassifier obj's underlying member method code with example usage: obj.forward(xs, ys) and returns: loss