class_docstr: Lightning module specialized for EfficientDet, with metrics support.
  
  The methods `forward`, `training_step`, `validation_step`, `validation_epoch_end`
  are already overriden.
  
  # Arguments
      model: The pytorch model to use.
      metrics: `Sequence` of metrics to use.
  
  # Returns
      A `LightningModule`.
class_docstr_tok: ["Lightning","module","specialized","for","EfficientDet",",","with","metrics","support",".","The","methods","`","forward","`",",","`","training_step","`",",","`","validation_step","`",",","`","validation_epoch_end","`","are","already","overriden",".","#","Arguments","model",":","The","pytorch","model","to","use",".","metrics",":","`","Sequence","`","of","metrics","to","use",".","#","Returns","A","`","LightningModule","`","."]
code: def _shared_eval(self, batch, loss_log_key):
      (xb, yb), records = batch
  
      inference_out, training_out = self(xb)
      preds = self.convert_raw_predictions(
          batch=xb,
          raw_preds=inference_out,
          records=records,
          detection_threshold=0.001,
          nms_iou_threshold=0.6,
      )
      loss = self.compute_loss(training_out, yb)[0]
  
      self.accumulate_metrics(preds)
  
      self.log(f"{loss_log_key}_loss", loss)
  
file_path: icevision/icevision/models/ultralytics/yolov5/lightning/model_adapter.py
imports: from icevision.imports import *
  from icevision.metrics import *
  from icevision.engines.lightning.lightning_model_adapter import LightningModelAdapter
  from icevision.models.ultralytics import yolov5
  from yolov5.utils.loss import ComputeLoss
label_desc: Use image node_id 5 for calling the ModelAdapter obj's underlying member method code with example usage: obj._shared_eval(batch, loss_log_key) without return types