Skip to content

Commit

Permalink
Merge branch 'feature/20180524-fix_enum_size_error' into 'feature/201…
Browse files Browse the repository at this point in the history
…80401-file-format-converter'

Fix .nnb enum size problem

See merge request nnabla/nnabla!185
  • Loading branch information
YukioOobuchi committed May 28, 2018
2 parents 1e14865 + 2157d64 commit 02a56bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/src/nnabla/utils/converter/nnablart/nnb.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ def export(self, nnb_output_filename, settings_template_filename, settings_filen
for n, f in enumerate(self._info._network.function):

function_data = struct.pack(
'I', list(self._info._function_info.keys()).index(f.type))
'H', list(self._info._function_info.keys()).index(f.type))

# Default function implementation is 0(float)
if f.name not in settings['functions']:
settings['functions'][f.name] = collections.OrderedDict()
settings['functions'][f.name]['implement'] = 0

function_data += struct.pack('I',
function_data += struct.pack('H',
settings['functions'][f.name]['implement'])

finfo = self._info._function_info[f.type]
Expand Down

0 comments on commit 02a56bb

Please sign in to comment.