You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Result of tf.image.resizeBilinear in Java is different from tf.image.resize In python #333
tf version in python:2.5.0
tf version in java :2.4.1
Result of tf.image.resizeBilinear in Java is different from tf.image.resize In python
tf.image.cropAndResize can get the same result
Just to let you know that I've just merge this PR to upgrade the current 0.4.0 snapshots to TensorFlow 2.5.
It should be ready to be tested out in about 8 hours from now and it could be interesting to see if that fixes the slight delta you are observing in the pixel values between Java and Python scaling (I have doubts but we never know).
Activity
Craigacp commentedon Jun 7, 2021
Are you specifying
halfPixelCenters = truewhen you run that op in Java? It's set to true by Python'sresize.mimilewis commentedon Jun 7, 2021
After using it, the result is closer.
python:[ 212.21364,222.1122,211.72565 ]
java: [212.25,222.25,211.81567]
Craigacp commentedon Jun 7, 2021
Are you running it on the same hardware (i.e. CPU or GPU) for both languages? Also can you check the behaviour of tf python 2.4.1?
karllessard commentedon Jun 10, 2021
Just to let you know that I've just merge this PR to upgrade the current 0.4.0 snapshots to TensorFlow 2.5.
It should be ready to be tested out in about 8 hours from now and it could be interesting to see if that fixes the slight delta you are observing in the pixel values between Java and Python scaling (I have doubts but we never know).
karllessard commentedon Jun 11, 2021
Ok, we had some trouble building the new snapshots with TF2.5 but it is ready now to be used for testing.