class_docstr: This module implements the task- and model-specific estimator for PyTorch GOTURN (object tracking).
class_docstr_tok: ["This","module","implements","the","task-","and","model-specific","estimator","for","PyTorch","GOTURN","(","object","tracking",")","."]
docstr: Compute loss.
  
  :param x: Samples of shape (nb_samples, nb_frames, height, width, nb_channels).
  :param y: Target values of format `List[Dict[str, np.ndarray]]`, one dictionary for each input image. The keys
            of the dictionary are:
  
            - boxes [N_FRAMES, 4]: the boxes in [x1, y1, x2, y2] format, with 0 <= x1 < x2 <= W and
                                   0 <= y1 < y2 <= H.
  :return: Total loss.
docstr_tok: ["Compute","loss",".",":","param","x",":","Samples","of","shape","(","nb_samples",",","nb_frames",",","height",",","width",",","nb_channels",")",".",":","param","y",":","Target","values","of","format","`","List","[","Dict","[","str",",","np.ndarray","]","]","`",",","one","dictionary","for","each","input","image",".","The","keys","of","the","dictionary","are",":","-","boxes","[","N_FRAMES",",","4","]",":","the","boxes","in","[","x1",",","y1",",","x2",",","y2","]","format",",","with","0","<","=","x1","<","x2","<","=","W","and","0","<","=","y1","<","y2","<","=","H.",":","return",":","Total","loss","."]
code: def compute_loss(
      self,
      x: np.ndarray,
      y: List[Dict[str, Union[np.ndarray, "torch.Tensor"]]],
      **kwargs,
  ) -> np.ndarray:
      """
      Compute loss.
  
      :param x: Samples of shape (nb_samples, nb_frames, height, width, nb_channels).
      :param y: Target values of format `List[Dict[str, np.ndarray]]`, one dictionary for each input image. The keys
                of the dictionary are:
  
                - boxes [N_FRAMES, 4]: the boxes in [x1, y1, x2, y2] format, with 0 <= x1 < x2 <= W and
                                       0 <= y1 < y2 <= H.
      :return: Total loss.
      """
      import torch
  
      output_dict, _, _ = self._get_losses(x=x, y=y)
  
      if isinstance(output_dict["torch.nn.L1Loss"], list):
          output_list = []
          for out in output_dict["torch.nn.L1Loss"]:
              output_list.append(out.detach().cpu().numpy())
          output = np.array(output_list)
      elif isinstance(output_dict["torch.nn.L1Loss"], torch.Tensor):
          output = output_dict["torch.nn.L1Loss"].detach().cpu().numpy()
      else:
          output = np.array(output_dict["torch.nn.L1Loss"])
  
      return output
  
imports: import logging
  import time
  from typing import List, Dict, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from art.estimators.object_tracking.object_tracker import ObjectTrackerMixin
  from art.estimators.pytorch import PyTorchEstimator
label_desc: Use image node_id 14 for calling the PyTorchGoturn obj's underlying member method code with example usage: obj.compute_loss(x, y) and returns: output