I’m feeding a data into a single convolution layer from Pytorch and TensorFlow. I could make sure that:
- the input are the same, they are initialized randomly
- the kernel weights and bias are same, they are initialized randomly
- the way of padding is forced to be the same
However, the result shows that there been huge precision differences between the two frameworks. The difference is bigger than 1e-3.
I have attached more details in this notebook(click here). This problem is more vital when I tried increasing the input and output channels. While small channel numbers seems to be fine.
I would be really appreciate it someone could tell me what goes wrong with that. Thanks in advance.
Framework Version:
- Pytorch 1.10.0a0+git593e8f4
- TensorFlow 2.5.0 (but it’s tensorflow.compat.v1 in the notebook)