class_docstr: A simple L_p norm based regularizer.
class_docstr_tok: ["A","simple","L_p","norm","based","regularizer","."]
code: def forward(
      self, x: torch.FloatTensor
  ) -> torch.FloatTensor:  # noqa: D102
      return lp_norm(
          x=x, p=self.p, dim=self.dim, normalize=self.normalize
      ).mean()
  
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 2 for calling the LpRegularizer obj's underlying member method code with example usage: obj.forward(x) and returns: lp_norm