UNPKG

983 BTypeScriptView Raw
1/// <amd-module name="@tensorflow/tfjs-layers/dist/exports_regularizers" />
2import { L1Args, L1L2Args, L2Args, Regularizer } from './regularizers';
3/**
4 * Regularizer for L1 and L2 regularization.
5 *
6 * Adds a term to the loss to penalize large weights:
7 * loss += sum(l1 * abs(x)) + sum(l2 * x^2)
8 *
9 * @doc {heading: 'Regularizers', namespace: 'regularizers'}
10 */
11export declare function l1l2(config?: L1L2Args): Regularizer;
12/**
13 * Regularizer for L1 regularization.
14 *
15 * Adds a term to the loss to penalize large weights:
16 * loss += sum(l1 * abs(x))
17 * @param args l1 config.
18 *
19 * @doc {heading: 'Regularizers', namespace: 'regularizers'}
20 */
21export declare function l1(config?: L1Args): Regularizer;
22/**
23 * Regularizer for L2 regularization.
24 *
25 * Adds a term to the loss to penalize large weights:
26 * loss += sum(l2 * x^2)
27 * @param args l2 config.
28 *
29 * @doc {heading: 'Regularizers', namespace: 'regularizers'}
30 */
31export declare function l2(config?: L2Args): Regularizer;