@ai-on-browser/data-analysis-models
Version:
Data analysis model package without any dependencies
33 lines (32 loc) • 851 B
TypeScript
/**
* Adaptive piecewise linear layer
*/
export default class AdaptivePiecewiseLinearLayer extends Layer {
/**
* @param {object} config object
* @param {number} [config.s] Number of hinges
* @param {number | number[]} [config.a] Variables control the slopes of the linear segments
* @param {number | number[]} [config.b] Variables determine the locations of the hinges
*/
constructor({ s, a, b, ...rest }: {
s?: number;
a?: number | number[];
b?: number | number[];
});
_s: number;
_a: number[];
_b: any[];
_l2_decay: number;
calc(x: any): any;
_i: any;
grad(bo: any): any;
_bo: any;
update(optimizer: any): void;
toObject(): {
type: string;
s: number;
a: number[];
b: any[];
};
}
import Layer from './base.js';