AssertionError: Arrays are not almost equal to 3 decimals


(Vainaijr) #1

How to solve this error
super_resolution_with_caffe2.ipynb

AssertionError:
Arrays are not almost equal to 3 decimals

Mismatch: 99.9%
Max absolute difference: 6.1834984
Max relative difference: 644686.3
x: array([[[[-0.123, -0.263, -0.299, …, 0.347, 0.678, 0.701],
[-0.087, -0.314, -0.316, …, 0.658, 1.034, 0.952],
[ 0.174, 0.285, 0.381, …, 0.785, 1.027, 0.825],…
y: array([[[[-0.123, -0.589, 1.934, …, -0.062, -0.25 , 0.701],
[ 0.739, 1.21 , 1.578, …, 2.283, 0.828, 1.17 ],
[ 0.366, 1.071, 0.575, …, 0.824, -0.163, 0.195],…

“We should see that the output of PyTorch and Caffe2 runs match numerically up to 3 decimal places. As a side-note, if they do not match then there is an issue that the operators in Caffe2 and PyTorch are implemented differently and please contact us in that case.”