code: def monitor_metrics(self, outputs, targets):
      device = targets.device.type
      outputs = np.argmax(outputs.cpu().detach().numpy(), axis=1)
      targets = targets.cpu().detach().numpy()
      acc = metrics.accuracy_score(targets, outputs)
      acc = torch.tensor(acc, device=device)
      return {"accuracy": acc}
  
imports: import argparse
  import os
  import albumentations
  import numpy
  import pandas
  import timm
  import torch
  import torch.nn
  from cv2 import dft
  from sklearn import metrics, model_selection
  from tqdm.auto import tqdm
  from tez import Tez, TezConfig
  from tez.callbacks import EarlyStopping
  from tez.datasets import ImageDataset
  from tez.utils import seed_everything
label_desc: Use image node_id 2 for calling the SorghumModel obj's underlying member method code with example usage: obj.monitor_metrics(outputs, targets) and returns: dict