MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / loadFromPath

Method loadFromPath

plugins/wasi_nn/wasinn_torch.cpp:41–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41Expect<ErrNo> TorchScript::loadFromPath(const std::string &Path,
42 Device Device) {
43 if (auto Err = setDevice(Device); Err != ErrNo::Success) {
44 return Err;
45 }
46 TorchModel = torch::jit::load(Path);
47 return ErrNo::Success;
48}
49
50Expect<ErrNo> TorchScript::run(std::vector<at::Tensor> In,
51 std::vector<at::Tensor> &Out) {

Callers 1

loadFunction · 0.80

Calls 3

c_strMethod · 0.80
loadFunction · 0.70
errorFunction · 0.50

Tested by

no test coverage detected