class_docstr: Agent that uses a generator model with a classifier head.
  
  Useful for performing classification with a pretrained generator model. The
  generator encoder/decoder weights can be frozen during classifier training.
class_docstr_tok: ["Agent","that","uses","a","generator","model","with","a","classifier","head",".","Useful","for","performing","classification","with","a","pretrained","generator","model",".","The","generator","encoder\/decoder","weights","can","be","frozen","during","classifier","training","."]
code: def score(self, batch):
      return self.model(*self._model_input(batch))
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from itertools import chain
  import torch
  from torch.nn import functional
  from parlai.agents.transformer.transformer import TransformerClassifierAgent, TransformerGeneratorAgent
  from parlai.core.metrics import AverageMetric
  from parlai.core.torch_agent import Output
  from parlai.tasks.style_gen.agents import get_personality_list_path
  from parlai.utils.fp16 import FP16SafeCrossEntropy
  from parlai.utils.misc import warn_once, round_sigfigs
  from projects.style_gen.modules import ClassifierOnGeneratorModel, ClassificationMixin
label_desc: Use image node_id 11 for calling the ClassifierAgent obj's underlying member method code with example usage: obj.score(batch) and returns: self