@ai-on-browser/data-analysis-models
Version:
Data analysis model package without any dependencies
40 lines (39 loc) • 1.11 kB
TypeScript
/**
* Include layer
*/
export default class IncludeLayer extends Layer {
/**
* @param {object} config object
* @param {NeuralNetwork | object[]} config.net Included network
* @param {string} [config.input_to] Input name of the network
* @param {boolean} [config.train] Train included network or not
*/
constructor({ net, input_to, train, ...rest }: {
net: NeuralNetwork | object[];
input_to?: string;
train?: boolean;
});
_model: NeuralNetwork;
_input_to: string;
_train: boolean;
_org_i: any;
_org_t: any;
bind({ input, supervisor }: {
input: any;
supervisor: any;
}): void;
calc(x: any): Matrix<number> | {
[key: string]: Matrix<number>;
};
grad(bo: any): Matrix<number>;
update(optimizer: any): void;
toObject(): {
type: string;
net: import("../graph.js").LayerObject[];
input_to: string;
train: boolean;
};
}
import Layer from './base.js';
import NeuralNetwork from '../../neuralnetwork.js';
import Matrix from '../../../util/matrix.js';