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 given input_path.

Parameters
  • input_path (str) – Path to the scripted/traced torch model file (ScriptModule).

  • device_name (str) – Defaults to cpu

Return type

ScriptModule

Returns

A loaded torch model (ScriptModule) object.