sony/nnabla

NnpExporter gets exception when parameter_type="included"

Closed this issue · 2 comments

https://github.com/sony/nnabla/blob/master/python/src/nnabla/utils/converter/nnabla/exporter.py#L112-L119

The function write_nntxt() should be _write_nntxt()

Test:

nnabla_cli convert full_dense.nnp full_dense_test.nnp --nnp-parameter-nntxt

Output:

2021-03-02 09:53:23,709 [nnabla][INFO]: Initializing CPU extension...
NNabla command line interface (Version:1.17.0.dev2, Build:210301214346)
Importing full_dense.nnp
 Expanding full_dense.
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/nnabla/utils/cli/cli.py", line 147, in cli_main
    return_value = args.func(args)
  File "/usr/local/lib/python3.8/dist-packages/nnabla/utils/cli/convert.py", line 108, in convert_command
    nnabla.utils.converter.convert_files(args, args.files, output)
  File "/usr/local/lib/python3.8/dist-packages/nnabla/utils/converter/commands.py", line 301, in convert_files
    return _export_from_nnp(args, nnp, output)
  File "/usr/local/lib/python3.8/dist-packages/nnabla/utils/converter/commands.py", line 137, in _export_from_nnp
    NnpExporter(nnp, args.batch_size, parameter_type).execute(output)
  File "/usr/local/lib/python3.8/dist-packages/nnabla/utils/converter/nnabla/exporter.py", line 155, in execute
    self._export_nnp(ofile)
  File "/usr/local/lib/python3.8/dist-packages/nnabla/utils/converter/nnabla/exporter.py", line 141, in _export_nnp
    self._export_files(tmpdir)
  File "/usr/local/lib/python3.8/dist-packages/nnabla/utils/converter/nnabla/exporter.py", line 113, in _export_files
    self.write_nntxt('{}/network.nntxt'.format(outdir), self._nnp)
AttributeError: 'NnpExporter' object has no attribute 'write_nntxt'

Thank you very much, you're right.
We've merged the fix into main branch, so it will be released in the next version.
(the latest version 1.17.0 doesn't included this fix.)

Sorry too late update. This already fixed.
So, please let me close this issue.