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

Different input and output spatial dimensions in notebook example #39

Open
sbgeophd opened this issue Sep 20, 2021 · 2 comments
Open

Different input and output spatial dimensions in notebook example #39

sbgeophd opened this issue Sep 20, 2021 · 2 comments
Assignees

Comments

@sbgeophd
Copy link

Following on from the closed issue: #35

It is clear why the input and output shapes of the model differ ('VALID' padding). It should now be possible to create models with identical input and output spatial dimension sizes with: #38

However, it is unclear how the example notebook works. It appears to create labels (and features/inputs) with the spatial dimensions (128,128), but the model output is (60,60). How was it possible to train this model with different label and model output shapes?

@devisperessutti
Copy link
Contributor

Hi @sbgeophd !

Following the original U-net architecture, where only the valid part of the convolution was proposed to avoid edge artefacts propagating through the network, we have implemented cropped versions for the losses and the metrics.

This means that the labels are cropped to the outputs size before the calculation of the loss/metric. You can find this implementation in this line for the losses, with this cropped_loss implementation.

Hope this helps. Thanks again for the contribution (keep them coming 😄 )

@devisperessutti devisperessutti self-assigned this Sep 20, 2021
@sbgeophd
Copy link
Author

Ah ha! That's clear now. I'll try it out!

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

2 participants