MCPcopy Create free account
hub / github.com/PABannier/sam3.cpp / load_tensor

Function load_tensor

tests/dump_phase7_reference.py:42–45  ·  view source on GitHub ↗
(path: str)

Source from the content-addressed store, hash-verified

40
41
42def load_tensor(path: str) -> torch.Tensor:
43 shape = load_shape(path)
44 data = np.fromfile(path + ".bin", dtype=np.float32).reshape(shape)
45 return torch.from_numpy(data)
46
47
48def load_ggml_bd(path: str) -> torch.Tensor:

Callers 1

mainFunction · 0.70

Calls 1

load_shapeFunction · 0.85

Tested by

no test coverage detected