Skip to main content
Version: 0.2.2

Interface: Module

torchlive/torch.Module

Methods

forward

forward<In, Out>(...inputs): Promise<Out>

Module forward function.

Type parameters

NameType
InIn: ModuleInputValue
OutOut: ModuleValue

Parameters

NameTypeDescription
...inputsIn[]Module inputs. Input could be of type [[ModuleInputValue]]

Returns

Promise<Out>

Module output, which is particular to the model and can be any of the [[ModuleValue]] union types.


forwardSync

forwardSync<In, Out>(...inputs): Out

Synchronous module forward function.

Type parameters

NameType
InIn: ModuleInputValue
OutOut: ModuleValue

Parameters

NameTypeDescription
...inputsIn[]Module inputs. Input could be of type [[ModuleInputValue]]

Returns

Out

Module output, which is particular to the model and can be any of the [[ModuleValue]] union types.