ml-basic
Version:
Lightweight, zero dependency, machine learning library
12 lines (11 loc) • 384 B
TypeScript
import Matrix from "../lib/matrix";
import LoopLayer, { LoopParams } from "./loop";
export default class RecurrentLayer extends LoopLayer<'state' | 'input' | 'output'> {
name: string;
weights: Matrix;
bias: Matrix;
constructor(args: LoopParams);
clear(): void;
forward(input: Matrix, output: boolean): Matrix | undefined;
backward(loss: Matrix): Matrix;
}