class_docstr: A base class for all regularizers.
class_docstr_tok: ["A","base","class","for","all","regularizers","."]
docstr: Return the weighted regularization term, and reset the regularize afterwards.
docstr_tok: ["Return","the","weighted","regularization","term",",","and","reset","the","regularize","afterwards","."]
code: def pop_regularization_term(self) -> torch.FloatTensor:
      """Return the weighted regularization term, and reset the regularize afterwards."""
      # If there are tracked parameters, update based on them
      if self.tracked_parameters:
          self.update(*self.tracked_parameters)
  
      result = self.weight * self.regularization_term
      self.reset()
      return result
  
imports: from __future__ import annotations
  import warnings
  from abc import ABC, abstractmethod
  from typing import Any, ClassVar, Iterable, Mapping, Optional
  import torch
  from class_resolver import ClassResolver, normalize_string
  from torch import nn
  from torch.nn import functional
  from .utils import lp_norm, powersum_norm
label_desc: Use image node_id 8 for calling the Regularizer obj's underlying member method code with example usage: obj.pop_regularization_term() and returns: result