Skip to content

Commit cbc938c

Browse files
Merge branch 'main' into unit
2 parents 9d1ead4 + 9c3a461 commit cbc938c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Python/exportsd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def _write_tensor(t, stream):
3737
stream.write(leb128.u.encode(len(t.shape)))
3838
for s in t.shape:
3939
stream.write(leb128.u.encode(s))
40-
stream.write(t.numpy().tobytes())
40+
stream.write(t.detach().cpu().numpy().tobytes())
4141

4242
def write_tensor(t, file_name):
4343
f = open(file_name, "wb")

0 commit comments

Comments
 (0)