Back to Blog
Cpp istream7/26/2023 ![]() ![]() utils::MemReader mr(modelScript, modelScriptSize) With it, I am creating a std::istream and supply that to torch::jit::load(is, device). ![]() Its size is given as const size_t modelScriptSize.įor this purpose, I created a helper class that subclasses std::streambuf and wraps the buffer. pt model file now from a const char* modelScript. I did so successfully using torch::jit::load(filepath, device). I have successfully traced a model in Python and wanted to load it now in my C++ app. ![]()
0 Comments
Read More
Leave a Reply. |