UNPKG

recurrent-js-gpu

Version:

GPU-accelerated Deep Recurrent Neural Networks and LSTMs in Typescript. Ported, object-oriented and refactored version of Andrej Karpathy's recurrent-js (https://github.com/karpathy/recurrentjs)

19 lines (18 loc) 756 B
import { NNModel } from './NNModel'; export declare class Solver { protected readonly decayRate: number; protected readonly smoothEps: number; protected readonly stepCache: {}; protected stepTotalNumber: number; protected stepNumberOfClippings: number; constructor(decayRate?: number, smoothEps?: number); private reset(); step(model: NNModel, stepSize: number, l2Regularization: number, clippingValue: number): { 'ratioClipped': number; }; private iterateModelLayer(model, key, clipval, regc, stepSize); private RMSprop(modelLayer, i, stepCache); private gradientClipping(mdwi, clipval); private update(m, i, stepSize, mdwi, stepCache, regc); private resetGradients(currentModelLayer, i); }