Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using your model on multiple image pair batch will cause drastically different output #2

Open
Animadversio opened this issue Mar 21, 2020 · 2 comments

Comments

@Animadversio
Copy link

Input the image in a 2 image batches
image
image
Input the same image in a single image batch
image

Result in very different flow outputs.
Using the model chairs-things.pytorch and sintel.pytorch. I didn't find a module that introduce interaction between batch in your model...
Do you understand why that is the case?

@Animadversio
Copy link
Author

Animadversio commented Mar 22, 2020

I detailed debug the code on 2 computers and it seems it's about the default behavior of a pytorch function torch.nn.functional.grid_sample before 1.4.0 the default is to align_corner=True, at 1.4.0 this behavior is changed to be align_corner=False. so making the option explicit will retain the model's performance, which is trained with the older option.

image

See this pytorch/pytorch#23923

@Animadversio
Copy link
Author

This phenomenon is different from machine to machine, seems in one GPU the correlation layer ouput is wrong for Batch size >1 but on the other one it's correct.
Seems it's related to the compiled cuda code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant