Open ncherel opened 3 years ago
@ncherel Thansk for your attention!
I just confirmed that there is a mislalignment for the output. Thanks for pointing out it happens in the refined stage.
The resullt of examples/imagenet/imagenet_patches_ILSVRC2012_val_00025892_input.png
by the converted TF model:
Sorry, I am not sure about the reason for this problem and have little time to find it recently.
Here are some possible reasons:
By the way, the TF model is converted by @zphang semi-manually in this pr, you may try to convert it by yourself and check it again.
Thanks for your input. I finally managed to reproduce the official results using your code. I had to change a few things :
same_padding
operation before the conv_downsample
and slightly modify the function. When the total padding is odd, your code will insert 1 more for left / top rather than right / bottom as TFinterpolate
can't align corners when using nearest neighbors. Switching off corners alignment in TF gives the same result as this PyTorch code. Maybe one day PyTorch will support this and everything will be 1:1 equivalent.Awesome! Could you please share your code in a branch/pull request so that other people may learn from it? Thanks for your excellent work!
Hello, First of all, thank you for your great work.
I have observed a strange problem when using the converted weights from TensorFlow (thanks again!). I do not get exactly the same results than the official implementation. They are very close but slightly misaligned:
The coarse network seems to do its job correctly but something happens during the refinement step. Do you have an idea of where it could come from ?
Tested with PyTorch 1.7 and TensorFlow 1.15