docstr: Builds a L-p norm function. This regularizer encourages the intensity of pixels to stay bounded.
      i.e., prevents pixels from taking on very large values.
  
  Args:
      img_input: 4D image input tensor to the model of shape: `(samples, channels, rows, cols)`
          if data_format='channels_first' or `(samples, rows, cols, channels)` if data_format='channels_last'.
      p: The pth norm to use. If p = float('inf'), infinity-norm will be used.
docstr_tok: ["Builds","a","L-p","norm","function",".","This","regularizer","encourages","the","intensity","of","pixels","to","stay","bounded",".","i.e.",",","prevents","pixels","from","taking","on","very","large","values",".","Args",":","img_input",":","4D","image","input","tensor","to","the","model","of","shape",":","`","(","samples",",","channels",",","rows",",","cols",")","`","if","data_format='channels_first","'","or","`","(","samples",",","rows",",","cols",",","channels",")","`","if","data_format='channels_last","'",".","p",":","The","pth","norm","to","use",".","If","p","=","float","(","'inf","'",")",",","infinity-norm","will","be","used","."]
code: def __init__(self, img_input, p=6.0):
      """
      Builds a L-p norm function. This regularizer encourages the intensity of pixels to stay bounded.
          i.e., prevents pixels from taking on very large values.
  
      Args:
          img_input: 4D image input tensor to the model of shape: `(samples, channels, rows, cols)`
              if data_format='channels_first' or `(samples, rows, cols, channels)` if data_format='channels_last'.
          p: The pth norm to use. If p = float('inf'), infinity-norm will be used.
      """
      super(LPNorm, self).__init__()
      if p < 1:
          raise ValueError("p value should range between [1, inf)")
      self.name = "L-{} Norm Loss".format(p)
      self.p = p
      self.img = img_input
  
file_path: keras-vis/vis/regularizers.py
imports: from __future__ import absolute_import
  from __future__ import division
  import numpy
  from keras import backend
  from .losses import Loss
  from .utils import utils
label_desc: Use image node_id 1 to create a new LPNorm object from inherited base classes: Loss with example: obj = LPNorm(img_input, p)