This commit is contained in:
tqchen
2015-01-13 14:41:37 -08:00
parent c127f9650c
commit 532575b752
2 changed files with 26 additions and 1 deletions

View File

@@ -223,7 +223,7 @@ def load_model__(ptr, length):
length: int
the length of buffer
"""
data = (ctypes.c_char * length).from_address(addressof(ptr.contents))
data = (ctypes.c_char * length).from_address(ctypes.addressof(ptr.contents))
return pickle.loads(data.raw)
def load_checkpoint(with_local = False):