code: def _loop(self, dl, model, losses_stats, device):
      samples_plus_losses = []
  
      with torch.no_grad():
          for (x, y), sample in pbar(dl):
              torch.manual_seed(0)
              x, y = _move_to_device(x, y, device)
              loss = model(x, y)
              loss = {
                  k: float(v.cpu().numpy()) for k, v in loss.items()
              }
              loss = self._rename_losses(loss)
              loss = self._sum_losses(loss)
  
              for l in losses_stats.keys():
                  losses_stats[l].append(loss[l])
  
              loss = _prepend_str(loss, "loss")
              loss_comp = LossesRecordComponent()
              loss_comp.set_losses(loss)
              sample[0].add_component(loss_comp)
              sample[0].set_img(tensor_to_image(x[0]))
              samples_plus_losses.append(sample[0])
      return samples_plus_losses, losses_stats
  
file_path: icevision/icevision/models/interpretation.py
imports: from icevision.imports import *
  from icevision.utils import *
  from icevision.core import *
  from icevision.data import *
  from icevision.visualize.show_data import show_preds
  from icevision.core.record_components import LossesRecordComponent
label_desc: Use image node_id 4 for calling the Interpretation obj's underlying member method code with example usage: obj._loop(dl, model, losses_stats, device) and returns: samples_plus_losses,  losses_stats