Function torch::jit::load(const std::string&, std::optional<c10::Device>, bool)¶
Defined in File import.h
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 givenfilename
.The file stored at the location given in
filename
must contain a serializedModule
, exported either viaScriptModule.save()
in Python ortorch::jit::ExportModule
in C++.