import { Variable } from '../autograd/variable'; import Tensor from '../types'; import { Backend } from '../util/convert'; export declare type Mode = 'train' | 'inference'; /** * A module is a self contained unit that transforms * a list of inputs when forward is called. * * It can be in two modes, training and inference. * In training mode, gradients will be tracked, while * in inference mode, only the forward pass will be calculated */ export declare abstract class Module { backend: Backend; mode: Mode; abstract forward(inputs: Tensor[]): Promise[]>; getSubModules(): Module[]; getParameters(): Variable[]; toBackend(backend: Backend): Promise; toCPU(): Promise; toWASM(): Promise; toGPU(): Promise; }