Interface: JIT
torchlive/torch.JIT
Methods
_loadForMobile
▸ _loadForMobile<T>(filePath
, device?
, extraFiles?
): Promise
<T>
Loads a serialized mobile module.
Type parameters
Name | Type |
---|---|
T | T : Module = Module |
Parameters
Name | Type | Description |
---|---|---|
filePath | string | Path to serialized mobile module. |
device? | "cpu" | Device on which the model will be loaded. |
extraFiles? | ExtraFilesMap | Load extra files when loading the model. |
Returns
Promise
<T>
Serialized mobile module of the specified type extending Module, which, if not specified, default to be Module
_loadForMobileSync
▸ _loadForMobileSync<T>(filePath
, device?
, extraFiles?
): T
Loads a serialized mobile module synchronously.
Type parameters
Name | Type |
---|---|
T | T : Module = Module |
Parameters
Name | Type | Description |
---|---|---|
filePath | string | Path to serialized mobile module. |
device? | "cpu" | Device on which the model will be loaded. |
extraFiles? | ExtraFilesMap | Load extra files when loading the model. |
Returns
T
Serialized mobile module of the specified type extending Module, which, if not specified, default to be Module