ONNX/Tensorflor export failure
Closed this issue · 2 comments
TomonobuTsujikawa commented
In nnabla 1.20.0, use nnabla_cli to export nnp to onnx or tensorflow would encounter below error:
File "~/anaconda3/envs/tfenv/lib/python3.6/site-packages/nnabla/utils/cli/cli.py", line 147, in cli_main
return_value = args.func(args)
File "~/anaconda3/envs/tfenv/lib/python3.6/site-packages/nnabla/utils/cli/convert.py", line 109, in convert_command
nnabla.utils.converter.convert_files(args, args.files, output)
File "~/anaconda3/envs/tfenv/lib/python3.6/site-packages/nnabla/utils/converter/commands.py", line 306, in convert_files
return _export_from_nnp(args, nnp, output)
File "~/anaconda3/envs/tfenv/lib/python3.6/site-packages/nnabla/utils/converter/commands.py", line 168, in _export_from_nnp
OnnxExporter(nnp, args.batch_size).execute(output)
File "~/anaconda3/envs/tfenv/lib/python3.6/site-packages/nnabla/utils/converter/onnx/exporter.py", line 3605, in execute
self.create_graph()
File "~/anaconda3/envs/tfenv/lib/python3.6/site-packages/nnabla/utils/converter/onnx/exporter.py", line 3538, in create_graph
nl = self.set_nodes(f)
File "~/anaconda3/envs/tfenv/lib/python3.6/site-packages/nnabla/utils/converter/onnx/exporter.py", line 3417, in set_nodes
return op_type(func)
File "~/anaconda3/envs/tfenv/lib/python3.6/site-packages/nnabla/utils/converter/onnx/exporter.py", line 665, in BaseConvolution
if new_input_shape != input_shape:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
YukioOobuchi commented
We are currently working on a fixed release, but if you are in a hurry,
Please edit utils/converter/onnx/exporter.py
in the installed nnabla as same as following patch.
https://github.com/sony/nnabla/pull/894/files
YukioOobuchi commented