class_docstr: Recurrent NStepLSTM language model.
  
  Generate captions given features extracted from images.
docstr: Batch of image features to captions.
docstr_tok: ["Batch","of","image","features","to","captions","."]
code: def predict(self, img_feats, bos, eos, max_caption_length):
      """Batch of image features to captions."""
      hx, cx, _ = self.reset(img_feats)
  
      with chainer.using_device(self.device):
          xp = self.xp
          captions = xp.full(
              (img_feats.shape[0], 1), bos, dtype=np.int32
          )
          for i in range(max_caption_length):
              # Create a list of the previous tokens to treat as inputs
              xs = [xp.atleast_1d(c[-1]) for c in captions]
  
              # Get the predictions `ys`
              hx, cx, ys = self.step(hx, cx, xs)
  
              # From `ys`, get the indices for the highest confidence.
              # These indices correspond to the predicted tokens
              #
              # Note that this is a greedy approach and that it can by
              # replaced by e.g. beam search
              pred = ys.array.argmax(axis=1).astype(np.int32)
              captions = xp.hstack((captions, pred[:, None]))
  
              if (pred == eos).all():
                  break
      return captions
  
imports: import numpy
  import chainer
  from chainer import functions
  from chainer import initializers
  from chainer import links
  from chainer import reporter
  from chainer import Variable
label_desc: Use image node_id 3 for calling the NStepLSTMLanguageModel obj's underlying member method code with example usage: obj.predict(img_feats, bos, eos, max_caption_length) and returns: captions