Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from mavenlin/master
Browse files Browse the repository at this point in the history
fix python call bug
  • Loading branch information
antinucleon committed Aug 20, 2015
2 parents 910738d + 72eb074 commit c956ae7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/mxnet/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def __init__(self):
ctypes.byref(plist)))
hmap = {}
for i in range(size.value):
hdl = plist[i]
hdl = ctypes.c_void_p(plist[i])
name = ctypes.c_char_p()
check_call(_LIB.MXFuncGetName(hdl, ctypes.byref(name)))
hmap[name.value] = _Function(hdl, name.value)
Expand Down
5 changes: 3 additions & 2 deletions python/mxnet/symbol_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ def __init__(self):
ctypes.byref(plist)))
hmap = {}
for i in range(size.value):
hdl = ctypes.c_void_p(plist[i])
name = ctypes.c_char_p()
check_call(_LIB.MXSymbolGetAtomicSymbolName(plist[i], ctypes.byref(name)))
hmap[name.value] = _SymbolCreator(name, plist[i])
check_call(_LIB.MXSymbolGetAtomicSymbolName(hdl, ctypes.byref(name)))
hmap[name.value] = _SymbolCreator(name, hdl)
self.__dict__.update(hmap)

def Variable(self, name):
Expand Down

0 comments on commit c956ae7

Please sign in to comment.