Skip to content

Regularization¤

Module: generative_models.core.losses.regularization

Source: generative_models/core/losses/regularization.py

Overview¤

Regularization losses module.

This module provides regularization terms that can be added to other losses to improve model stability, generalization, and prevent overfitting. All functions are JAX-compatible and work with NNX modules.

Classes¤

DropoutRegularization¤

class DropoutRegularization

SpectralNormRegularization¤

class SpectralNormRegularization

Functions¤

call¤

def __call__()

call¤

def __call__()

init¤

def __init__()

init¤

def __init__()

disc_interpolated¤

def disc_interpolated()

exclude_bias_predicate¤

def exclude_bias_predicate()

exclude_norm_predicate¤

def exclude_norm_predicate()

gradient_penalty¤

def gradient_penalty()

l1_regularization¤

def l1_regularization()

l2_regularization¤

def l2_regularization()

only_conv_predicate¤

def only_conv_predicate()

orthogonal_regularization¤

def orthogonal_regularization()

spectral_norm_regularization¤

def spectral_norm_regularization()

total_variation_loss¤

def total_variation_loss()

Module Statistics¤

  • Classes: 2
  • Functions: 14
  • Imports: 5