class_docstr: Basic class for a `Learner` in NLP.
class_docstr_tok: ["Basic","class","for","a","`","Learner","`","in","NLP","."]
code: def load(
      self,
      file: str,  # Filename of saved model
      with_opt: bool = None,  # Enable to load `Optimizer` state
      device: int
      | str
      | torch.device = None,  # Device used to load, defaults to `dls` device
      **kwargs,
  ):
      if device is None:
          device = self.dls.device
      if self.opt is None:
          self.create_opt()
      file = join_path_file(
          file, self.path / self.model_dir, ext=".pth"
      )
      load_model_text(
          file, self.model, self.opt, device=device, **kwargs
      )
      return self
  
imports: from __future__ import annotations
  from ..basics import *
  from .core import *
  from .data import *
  from .models.core import *
  from .models.awdlstm import *
  from ..callback.rnn import *
  from ..callback.progress import *
  from .models.core import _model_meta
label_desc: Use image node_id 5 for calling the TextLearner obj's underlying member method code with example usage: obj.load(file, with_opt, device) and returns: self