Skip to content

"Same" padding for conv layers? #813

Closed
@DrChainsaw

Description

@DrChainsaw

Many popular DL frameworks out there support automatically computing the padding needed to make inputsize == outputsize (* stride).

As far as I can see this is not supported in Flux, or is there some secret util method for it somewhere?

I can make a PR for this. I just want to give someone a chance to stop me in case it is already implemented or if it is not wanted for some reason.

Early feedback on the API would also be useful. I'm thinking of just using the pad keyword for this in the existing method signatures (e.g. pad=Same() means calculate "same" padding).

I would prefer to make a type for this and then just dispatch on it. Afaik it is not possible to dispatch on kwargs, but I guess one can just call some determine_padding function (which ofc is a noop in case padding is given explicitly).

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