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?
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()andupdateGradInput()intoforward()andbackward(), respectively. In support of this notion, I wasn't able to find any THNN code for padding.Any guidance?