class_docstr: A long short-term memory neural network for text classification.
  
  We use different versions of this network to pretrain models for
  text classification.
class_docstr_tok: ["A","long","short-term","memory","neural","network","for","text","classification",".","We","use","different","versions","of","this","network","to","pretrain","models","for","text","classification","."]
code: def forward(self, _input):
      # ensure RNN module weights are part of single contiguous chunk of memory
      self.encoder.flatten_parameters()
  
      emb = self.emb_layer(_input.t())
      emb = self.drop(emb)
  
      output, hidden = self.encoder(emb)
      output = torch.max(output, dim=0)[0]
  
      output = self.drop(output)
      pred = self.out(output)
      return pred
  
file_path: TextAttack/textattack/models/helpers/lstm_for_classification.py
imports: import json
  import os
  import torch
  from torch import nn
  import textattack
  from textattack.model_args import TEXTATTACK_MODELS
  from textattack.models.helpers import GloveEmbeddingLayer
  from textattack.models.helpers.utils import load_cached_state_dict
  from textattack.shared import utils
label_desc: Use image node_id 5 for calling the LSTMForClassification obj's underlying member method code with example usage: obj.forward(_input) and returns: pred