Closed emiliocoutinho closed 4 years ago
Awesome work. Thanks Emilio. I'm going to move this source up into the confirmed list and review its priority relative to other ops, given that it's probably going to be a similar solution to that for bilinear filtering (referencing TF PR 39243). Thanks also for reporting the work-around.
With this commit, I have updated README.md to reflect all of this. I have also added fixing nearest neighbor resizing to my to-do list. This feature addition is in the pipeline to get added to TensorFlow. I'm going to close this issue now.
Closing.
I believe there is a source of non-determinism on tf.keras.layers.UpSampling2D with interpolation='nearest', as you suggest on Other Possible GPU-Specific Sources of Non-Determinism.
In my case, I was building an auto-encoder, and on the decoder part, there were some procedures that I was not satisfied with and I was just waiting for the right time to change them. Turns out that this part was responsible for the non-deterministic behavior and as in #12, I replaced:
by:
and now I have reproducible results on GPU and on CPU.
Thanks for the effort in building this package, it is very useful.
Best Regards.