class_docstr: Loads a PyTorch model (`nn.Module`) and tokenizer.
docstr: :param torch.nn.Module model: target PyTorch model
  :param 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.
  :param str task: task name
  :param int batch_size:  batch size to apply evaluation
code: def __init__(self, model, tokenizer, task="SA", batch_size=32):
      """
  
      :param torch.nn.Module model: target PyTorch model
      :param 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.
      :param str task: task name
      :param int batch_size:  batch size to apply evaluation
      """
      if not isinstance(model, torch.nn.Module):
          raise TypeError(
              f"PyTorch model must be torch.nn.Module, got type {type(model)}"
          )
  
      super().__init__(
          model, tokenizer, task=task, batch_size=batch_size
      )
      self.model = model.to(device)
  
file_path: textflint/textflint/input/model/flint_model/torch_model.py
imports: import torch
  from torch.nn import CrossEntropyLoss
  from .flint_model import FlintModel
  from ....common.utils import device
label_desc: Use image node_id 1 to create a new TorchModel object from inherited base classes: FlintModel with example: obj = TorchModel(model, tokenizer, task, batch_size)