I had found something strange…
When I tried to convert a
.pb model(containing reshape op and conv2d op) into TVM, as seen in the following pictrue, i obatin the different results by Tensorflow and TVM.
I test the result by
numpy.testing.allclose(tvm_out, tf_out, atol=1e-5, rtol=1e-5), then the result is
AssertionError: Not equal to tolerance rtol=1e-05, atol=1e-05 (mismatch 0.2635099449936291%) x: array([ 11.083764, -14.04364 , -1.184902, ..., -32.929897, -35.814198, 76.43094 ], dtype=float32) y: array([ 11.083763, -14.043638, -1.184902, ..., -32.929893, -35.814198, 76.43094 ], dtype=float32)
Can anyone help me?
Some guesses are the tensorflow implements the conv2d by im2col+gemm(blas) which is different from tvm. and loss of accuracy when performing multiply add.