class_docstr: >>> ImageNetLightningModel(data_path='missing')  # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
  ImageNetLightningModel(
    (model): ResNet(...)
  )
class_docstr_tok: [">",">",">","ImageNetLightningModel","(","data_path='missing","'",")","#","doctest",":","+ELLIPSIS","+NORMALIZE_WHITESPACE","ImageNetLightningModel","(","(","model",")",":","ResNet","(","...",")",")"]
code: def eval_step(self, batch, batch_idx, prefix: str):
      images, target = batch
      output = self.model(images)
      loss_val = F.cross_entropy(output, target)
      self.log(f"{prefix}_loss", loss_val)
      # update metrics
      self.eval_acc1(output, target)
      self.eval_acc5(output, target)
      self.log(f"{prefix}_acc1", self.eval_acc1, prog_bar=True)
      self.log(f"{prefix}_acc5", self.eval_acc5, prog_bar=True)
      return loss_val
  
imports: import os
  from typing import Optional
  import torch
  import torch.nn.functional
  import torch.nn.parallel
  import torch.optim
  import torch.optim.lr_scheduler
  import torch.utils.data
  import torch.utils.data.distributed
  import torchvision.datasets
  import torchvision.transforms
  from lightning.pytorch import LightningModule
  from lightning.pytorch.callbacks import ModelCheckpoint, TQDMProgressBar
  from lightning.pytorch.cli import LightningCLI
  from lightning.pytorch.strategies import ParallelStrategy
  from lightning.pytorch.utilities.model_helpers import get_torchvision_model
  from torch.utils.data import Dataset
  from torchmetrics import Accuracy
label_desc: Use image node_id 4 for calling the ImageNetLightningModel obj's underlying member method code with example usage: obj.eval_step(batch, batch_idx, prefix) and returns: loss_val