docstr: Decode image feature vectors and generates captions.
docstr_tok: ["Decode","image","feature","vectors","and","generates","captions","."]
code: def forward(self, features, captions, lengths):
      """Decode image feature vectors and generates captions."""
      embeddings = self.embed(captions)
      embeddings = torch.cat((features.unsqueeze(1), embeddings), 1)
      packed = pack_padded_sequence(
          embeddings, lengths, batch_first=True
      )
      hiddens, _ = self.lstm(packed)
      outputs = self.linear(hiddens[0])
      return outputs
  
file_path: pytorch-tutorial/tutorials/03-advanced/image_captioning/model.py
imports: import torch
  import torch.nn
  import torchvision.models
  from torch.nn.utils.rnn import pack_padded_sequence
label_desc: Use image node_id 2 for calling the DecoderRNN obj's underlying member method code with example usage: obj.forward(features, captions, lengths) and returns: outputs