class_docstr: A very general abstract class representing a metric which can be
  accumulated.
docstr: If you actually passed gradient-tracking Tensors to a Metric, there will be
  a huge memory leak, because it will prevent garbage collection for the computation
  graph. This method ensures that you're using tensors directly and that they are on
  the CPU.
code: def unwrap_to_tensors(*tensors):
      """
      If you actually passed gradient-tracking Tensors to a Metric, there will be
      a huge memory leak, because it will prevent garbage collection for the computation
      graph. This method ensures that you're using tensors directly and that they are on
      the CPU.
      """
      return (
          x.detach().cpu() if isinstance(x, torch.Tensor) else x
          for x in tensors
      )
  
file_path: magnitude/pymagnitude/third_party/allennlp/training/metrics/metric.py
imports: from __future__ import absolute_import
  import torch
  from allennlp.common.registrable import Registrable
label_desc: Use image node_id 4 for calling the Metric obj's underlying member method code with example usage: obj.unwrap_to_tensors() and returns: unknown