orkgnlp.common.util.io.load_torch_jit
- load_torch_jit(input_path, device_name='cpu')[source]
Loads the scripted/traced
torch model
file (ScriptModule) of the giveninput_path
.- Parameters
input_path (
str
) – Path to the scripted/traced torch model file (ScriptModule).device_name (
str
) – Defaults tocpu
- Return type
ScriptModule
- Returns
A loaded torch model (ScriptModule) object.