@ai-on-browser/data-analysis-models
Version:
Data analysis model package without any dependencies
26 lines (25 loc) • 632 B
TypeScript
/**
* Readout layer
*/
export default class ReadoutLayer extends Layer {
/**
* @param {object} config config
* @param {'sum' | 'mean'} [config.method] Aggregate method
*/
constructor({ method, ...rest }: {
method?: 'sum' | 'mean';
});
_method: "sum" | "mean";
calc(x: any): Tensor | Matrix<number>;
_i: any;
_o: Tensor | Matrix<number>;
grad(bo: any): any;
_bi: any;
toObject(): {
type: string;
method: "sum" | "mean";
};
}
import Layer from './base.js';
import Tensor from '../../../util/tensor.js';
import Matrix from '../../../util/matrix.js';