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 load_from_disk(self, model_path):
      # TODO: Consider removing this in the future as well as loading via `model_path` in `__init__`.
      import warnings
  
      warnings.warn(
          "`load_from_disk` method is deprecated. Please save and load using `save_pretrained` and `from_pretrained` methods.",
          DeprecationWarning,
          stacklevel=2,
      )
      self.load_state_dict(load_cached_state_dict(model_path))
      self.eval()
  
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 2 for calling the LSTMForClassification obj's underlying member method code with example usage: obj.load_from_disk(model_path) without return types