Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
42
def
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
48
def
load_ggml_bd(path: str) -> torch.Tensor:
Callers
1
main
Function · 0.70
Calls
1
load_shape
Function · 0.85
Tested by
no test coverage detected