Rate this Page

Function torch::jit::load(const std::string&, std::optional<c10::Device>, bool)#

Function Documentation#

Module torch::jit::load(const std::string &filename, std::optional<c10::Device> device = std::nullopt, bool load_debug_files = true)#

Loads a serialized Module from the given filename.

The file stored at the location given in filename must contain a serialized Module, exported either via ScriptModule.save() in Python or torch::jit::ExportModule in C++.