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

TypeError: op_averagepool() got an unexpected keyword argument 'ceil_mode' #8

Open ardamavi opened 3 years ago

ardamavi commented 3 years ago

I get this error, can anybody help me?

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/name/opt/anaconda3/envs/onnx2keras/lib/python3.6/site-packages/onnx2keras.py", line 554, in onnx2keras
    output_tensors = ops.make_op(node.op_type, inputs, attrs)
  File "/Users/name/opt/anaconda3/envs/onnx2keras/lib/python3.6/site-packages/onnx2keras.py", line 17, in make_op
    return getattr(self, 'op_' + op_type.lower())(*inputs, **attrs)
TypeError: op_averagepool() got an unexpected keyword argument 'ceil_mode'

Versions:

hakanardo commented 3 years ago

None default ceil_mode is not yet supported. To fix it we need to add a ceil_mode parameter with a default value to op_averagepool() and figgure out how to pass it along to keras.layers.AveragePooling2D, and verify that we got all cases correct by adding tests.