Skip to content

Add ZeroPadding module #1324

@andrewgiessel

Description

@andrewgiessel

Hello- currently pytorch has ReflectionPadding and ReplicationPadding but not ZeroPadding, and I'd like to help add it.

(Bear with me, as I'm new to the codebase)

After reading a bit, it seems like the currently implemented padding modules call backend functions which are themselves automatically imported/created by scanning through the the function definitions in THNN.h, and wrapping compiled code based on that.

However, the legacy padding module seems a bit simpler, and is in pure python. I hoping there is some standard and straight-foreward way to re-write updateOutput() and updateGradInput() into forward() and backward(), respectively. In support of this notion, I wasn't able to find any THNN code for padding.

Any guidance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    todoNot as important as medium or high priority tasks, but we will work on these.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions