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

Bug in NLayerDiscriminator: padw ceil instead of floor #185

Open
fa9r opened this issue Mar 8, 2020 · 0 comments · May be fixed by #186
Open

Bug in NLayerDiscriminator: padw ceil instead of floor #185

fa9r opened this issue Mar 8, 2020 · 0 comments · May be fixed by #186

Comments

@fa9r
Copy link

fa9r commented Mar 8, 2020

Hey, I believe there's a minor bug in NLayerDiscriminator: padding is set as padw = int(np.ceil((kw-1.0)/2)), but it should be floor, not ceil (assuming you want to have same padding, similar to pix2pix).

As a result, the output of NLayerDiscriminator is a tiny bit (5 pixels or so) bigger than pix2pix patchgan, but MSEloss/BCEloss will average over all outputs anyways, so I guess it shouldn't matter much performance-wise.

EDIT: fixed it and made a pull request in case you want to change it.

Best regards,
Felix

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

Successfully merging a pull request may close this issue.

1 participant