class_docstr: Loads a PyTorch model (`nn.Module`) and tokenizer.
  
  Args:
      model (torch.nn.Module): PyTorch model
      tokenizer: tokenizer whose output can be packed as a tensor and passed to the model.
          No type requirement, but most have `tokenizer` method that accepts list of strings.
class_docstr_tok: ["Loads","a","PyTorch","model","(","`","nn.Module","`",")","and","tokenizer",".","Args",":","model","(","torch.nn.Module",")",":","PyTorch","model","tokenizer",":","tokenizer","whose","output","can","be","packed","as","a","tensor","and","passed","to","the","model",".","No","type","requirement",",","but","most","have","`","tokenizer","`","method","that","accepts","list","of","strings","."]
code: def __init__(self, model, tokenizer):
      if not isinstance(model, torch.nn.Module):
          raise TypeError(
              f"PyTorch model must be torch.nn.Module, got type {type(model)}"
          )
  
      self.model = model
      self.tokenizer = tokenizer
  
file_path: TextAttack/textattack/models/wrappers/pytorch_model_wrapper.py
imports: import torch
  from torch.nn import CrossEntropyLoss
  import textattack
  from .model_wrapper import ModelWrapper
label_desc: Use image node_id 1 to create a new PyTorchModelWrapper object from inherited base classes: ModelWrapper with example: obj = PyTorchModelWrapper(model, tokenizer)