AxisCommunications / onnx-to-keras

Convert onnx models exported from pytorch to tensorflow keras models with focus on performace and highleve compatibility.
MIT License
25 stars 13 forks source link

conv_padding test fails #20

Closed xsacha closed 3 years ago

xsacha commented 3 years ago

When running nosetests:

====================================================================== ERROR: test_onnx2keras.TestOnnx.test_conv_padding

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest self.test(self.arg) File "/home/imagus/onnx-to-keras/test_onnx2keras.py", line 83, in test_conv_padding convert_and_compare_output(net, x) File "/home/imagus/onnx-to-keras/test_onnx2keras.py", line 27, in convert_and_compare_output return _convert_and_compare_output(net, indata, precition, image_out, savable, missing_optimizations, opset_version) File "/home/imagus/onnx-to-keras/test_onnx2keras.py", line 37, in _convert_and_compare_output kernas_net = onnx2keras(onnx_model) File "/home/imagus/onnx-to-keras/onnx2keras.py", line 625, in onnx2keras output_tensors = ops.make_op(node.op_type, inputs, attrs) File "/home/imagus/onnx-to-keras/onnx2keras.py", line 18, in makeop return getattr(self, 'op' + op_type.lower())(inputs, **attrs) File "/home/imagus/onnx-to-keras/onnx2keras.py", line 146, in op_conv conv.set_weights([weights.view(np.ndarray), bias.view(np.ndarray)]) File "/usr/local/lib/python3.8/dist-packages/keras/engine/base_layer.py", line 1799, in set_weights raise ValueError( ValueError: Layer weight shape (3, 3, 1, 1) not compatible with provided weight shape (3, 3, 16, 1)

xsacha commented 3 years ago

My fault