class_docstr: Actual model code for the Transresnet Agent.
docstr: Evaluate performance of model on one batch.
  
  Batch is split into chunks of 100 to evaluate hits@1/100
  
  :param image_features:
      list of tensors of image features
  :param personalities:
      list of personalities
  :param captions:
      list of captions
  
  :return:
      the total loss, the number of correct examples, and the number of
      examples trained on
docstr_tok: ["Evaluate","performance","of","model","on","one","batch",".","Batch","is","split","into","chunks","of","100","to","evaluate","hits","@","1\/100",":","param","image_features",":","list","of","tensors","of","image","features",":","param","personalities",":","list","of","personalities",":","param","captions",":","list","of","captions",":","return",":","the","total","loss",",","the","number","of","correct","examples",",","and","the","number","of","examples","trained","on"]
code: def eval_batch(self, image_features, personalities, captions):
      """
      Evaluate performance of model on one batch.
  
      Batch is split into chunks of 100 to evaluate hits@1/100
  
      :param image_features:
          list of tensors of image features
      :param personalities:
          list of personalities
      :param captions:
          list of captions
  
      :return:
          the total loss, the number of correct examples, and the number of
          examples trained on
      """
      if personalities is None:
          personalities = [""] * len(image_features)
      if len(image_features) == 0:
          return 0, 0, 1
      self.eval()
      context_encoded, captions_encoded = self.forward(
          image_features, personalities, captions
      )
      loss, num_correct, num_examples = self.eval_batch_of_100(
          context_encoded, captions_encoded
      )
      return loss, num_correct, num_examples
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  import torch
  from torch import nn
  from torch import optim
  from parlai.agents.transformer.modules import TransformerEncoder
  from parlai.agents.transformer import transformer
  from parlai.utils.io import PathManager
label_desc: Use image node_id 11 for calling the TransresnetModel obj's underlying member method code with example usage: obj.eval_batch(image_features, personalities, captions) and returns: loss,  num_correct,  num_examples, int,  int,  int