class_docstr: Replaceable abstract base for regularization metrics.
  `forward()` method produces regularization metrics and (unlike ViewMetrics) can
  depend on the model's parameters.
docstr: Calculates various regularization terms useful for supervising differentiable
  rendering pipelines.
  
  Args:
      model: A model instance. Useful, for example, to implement
          weights-based regularization.
      keys_prefix: A common prefix for all keys in the output dictionary
          containing all regularization metrics.
  
  Returns:
      A dictionary with the resulting regularization metrics. The items
          will have form `{metric_name_i: metric_value_i}` keyed by the
          names of the output metrics `metric_name_i` with their corresponding
          values `metric_value_i` represented as 0-dimensional float tensors.
docstr_tok: ["Calculates","various","regularization","terms","useful","for","supervising","differentiable","rendering","pipelines",".","Args",":","model",":","A","model","instance",".","Useful",",","for","example",",","to","implement","weights-based","regularization",".","keys_prefix",":","A","common","prefix","for","all","keys","in","the","output","dictionary","containing","all","regularization","metrics",".","Returns",":","A","dictionary","with","the","resulting","regularization","metrics",".","The","items","will","have","form","`","{","metric_name_i",":","metric_value_i","}","`","keyed","by","the","names","of","the","output","metrics","`","metric_name_i","`","with","their","corresponding","values","`","metric_value_i","`","represented","as","0-dimensional","float","tensors","."]
code: def forward(
      self, model: Any, keys_prefix: str = "loss_", **kwargs
  ) -> Dict[str, Any]:
      """
      Calculates various regularization terms useful for supervising differentiable
      rendering pipelines.
  
      Args:
          model: A model instance. Useful, for example, to implement
              weights-based regularization.
          keys_prefix: A common prefix for all keys in the output dictionary
              containing all regularization metrics.
  
      Returns:
          A dictionary with the resulting regularization metrics. The items
              will have form `{metric_name_i: metric_value_i}` keyed by the
              names of the output metrics `metric_name_i` with their corresponding
              values `metric_value_i` represented as 0-dimensional float tensors.
      """
      raise NotImplementedError
  
imports: import warnings
  from typing import Any, Dict, Optional
  import torch
  from pytorch3d.implicitron.models.renderer.ray_sampler import ImplicitronRayBundle
  from pytorch3d.implicitron.tools import metric_utils
  from pytorch3d.implicitron.tools.config import registry, ReplaceableBase
  from pytorch3d.ops import padded_to_packed
  from pytorch3d.renderer import utils
  from .renderer.base import RendererOutput
label_desc: Use image node_id 1 for calling the RegularizationMetricsBase obj's underlying member method code with example usage: obj.forward(model, keys_prefix) without return types