XiaoMi / kaldi-onnx

Kaldi model converter to ONNX
Apache License 2.0
237 stars 57 forks source link

Convert failed #22

Open yangxueruivs opened 5 years ago

yangxueruivs commented 5 years ago

When I convert nnet3 model, it came up this problem. Seems that the converter cannot handle component correctly.

` Traceback (most recent call last): File "/home/kaldi-onnx/converter/utils.py", line 268, in read_matrix f = float(tok) ValueError: could not convert string to float: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "converter/convert.py", line 364, in main() File "converter/convert.py", line 324, in main onnx_model, configs, trans_model = converter.run() File "converter/convert.py", line 81, in run self.parse_configs() File "converter/convert.py", line 173, in parse_configs self._components, self._transition_model = parser.run() File "/home/kaldi-onnx/converter/parser.py", line 617, in run self.parse_component_lines() File "/home/kaldi-onnx/converter/parser.py", line 1073, in parse_component_lines component_type) File "/home/kaldi-onnx/converter/parser.py", line 1109, in read_component action_dict) File "/home/kaldi-onnx/converter/parser.py", line 1148, in read_generic obj, pos = func(line, pos, line_buffer) File "/home/kaldi-onnx/converter/utils.py", line 273, in read_matrix .format(sys.argv[0], pos, tok), file=sys.stderr) File "/usr/lib/python3.5/logging/init.py", line 1308, in error self._log(ERROR, msg, args, **kwargs) TypeError: _log() got an unexpected keyword argument 'file' `

framsc commented 4 years ago

I have exactly the same problem. read_matrix() in utils.py got stuck in output.affine layer. Did you solve the problem?