code: def evaluate_metric(model, data_iter, scaler):
      model.eval()
      with torch.no_grad():
          mae, mape, mse = [], [], []
          for x, y in data_iter:
              y = scaler.inverse_transform(y.cpu().numpy()).reshape(-1)
              y_pred = scaler.inverse_transform(
                  model(x).view(len(x), -1).cpu().numpy()
              ).reshape(-1)
              d = np.abs(y - y_pred)
              mae += d.tolist()
              mape += (d / y).tolist()
              mse += (d**2).tolist()
          MAE = np.array(mae).mean()
          MAPE = np.array(mape).mean()
          RMSE = np.sqrt(np.array(mse).mean())
          return MAE, MAPE, RMSE
  
label_desc: Use image node_id 2 for calling a global function with example usage: evaluate_metric(model, data_iter, scaler) and returns: MAE,  MAPE,  RMSE