@tensorflow/tfjs-layers
Version:
TensorFlow layers API in JavaScript
32 lines (31 loc) • 983 B
TypeScript
/// <amd-module name="@tensorflow/tfjs-layers/dist/exports_regularizers" />
import { L1Args, L1L2Args, L2Args, Regularizer } from './regularizers';
/**
* Regularizer for L1 and L2 regularization.
*
* Adds a term to the loss to penalize large weights:
* loss += sum(l1 * abs(x)) + sum(l2 * x^2)
*
* @doc {heading: 'Regularizers', namespace: 'regularizers'}
*/
export declare function l1l2(config?: L1L2Args): Regularizer;
/**
* Regularizer for L1 regularization.
*
* Adds a term to the loss to penalize large weights:
* loss += sum(l1 * abs(x))
* @param args l1 config.
*
* @doc {heading: 'Regularizers', namespace: 'regularizers'}
*/
export declare function l1(config?: L1Args): Regularizer;
/**
* Regularizer for L2 regularization.
*
* Adds a term to the loss to penalize large weights:
* loss += sum(l2 * x^2)
* @param args l2 config.
*
* @doc {heading: 'Regularizers', namespace: 'regularizers'}
*/
export declare function l2(config?: L2Args): Regularizer;