regularizers - Keras-vis Documentation (original) (raw)

Source: vis/regularizers.py#L0


normalize

normalize(input_tensor, output_tensor)

Normalizes the output_tensor with respect to input_tensor dimensions. This makes regularizer weight factor more or less uniform across various input image dimensions.

Args:

Returns:

The normalized tensor.


TotalVariation


TotalVariation.__init__

__init__(self, img_input, beta=2.0)

Total variation regularizer encourages blobbier and coherent image structures, akin to natural images. See section 3.2.2 inVisualizing deep convolutional neural networks using natural pre-imagesfor details.

Args:


TotalVariation.build_loss

build_loss(self)

Implements the N-dim version of function to return total variation for all images in the batch.


LPNorm


LPNorm.__init__

__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:


LPNorm.build_loss

build_loss(self)