Skip to content

Bug in NLayerDiscriminator: padw ceil instead of floor #185

Open
@fa9r

Description

@fa9r

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions