class_docstr: A regularizer for the soft orthogonality constraints from [wang2014]_.
class_docstr_tok: ["A","regularizer","for","the","soft","orthogonality","constraints","from","[","wang2014","]","_","."]
docstr: Initialize the regularizer.
  
  :param weight:
      The relative weight of the regularization
  :param apply_only_once:
      Should the regularization be applied more than once after reset?
  :param epsilon:
      a small value used to check for approximate orthogonality
  :param kwargs:
      additional keyword-based parameters passed to :meth:`Regularizer.__init__`
docstr_tok: ["Initialize","the","regularizer",".",":","param","weight",":","The","relative","weight","of","the","regularization",":","param","apply_only_once",":","Should","the","regularization","be","applied","more","than","once","after","reset","?",":","param","epsilon",":","a","small","value","used","to","check","for","approximate","orthogonality",":","param","kwargs",":","additional","keyword-based","parameters","passed","to",":","meth",":","`","Regularizer.__init__","`"]
code: def __init__(
      self,
      *,
      # could be moved into kwargs, but needs to stay for experiment integrity check
      weight: float = 1.0,
      # could be moved into kwargs, but needs to stay for experiment integrity check
      apply_only_once: bool = True,
      epsilon: float = 1e-5,
      **kwargs,
  ):
      """
      Initialize the regularizer.
  
      :param weight:
          The relative weight of the regularization
      :param apply_only_once:
          Should the regularization be applied more than once after reset?
      :param epsilon:
          a small value used to check for approximate orthogonality
      :param kwargs:
          additional keyword-based parameters passed to :meth:`Regularizer.__init__`
      """
      super().__init__(
          weight=weight, **kwargs, apply_only_once=apply_only_once
      )
      self.epsilon = epsilon
  
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 1 to create a new OrthogonalityRegularizer object from inherited base classes: Regularizer with example: obj = OrthogonalityRegularizer()