code: def monitor_metrics(self, outputs, targets):
      device = targets.device.type
      outputs = torch.argmax(outputs, dim=1).cpu().detach().numpy()
      targets = targets.cpu().detach().numpy()
      f1 = metrics.f1_score(targets, outputs, average="macro")
      return {"f1": torch.tensor(f1, device=device)}
  
file_path: tez/examples/image/flower_classification.py
imports: import glob
  import os
  import albumentations
  import timm
  import torch
  import torch.nn
  from sklearn import metrics
  from tez import Tez, TezConfig
  from tez.callbacks import EarlyStopping
  from tez.datasets import ImageDataset
label_desc: Use image node_id 2 for calling the FlowerModel obj's underlying member method code with example usage: obj.monitor_metrics(outputs, targets) and returns: dict