nudles commented on a change in pull request #734:
URL: https://github.com/apache/singa/pull/734#discussion_r440536637
##########
File path: python/singa/autograd.py
##########
@@ -4698,6 +4698,118 @@ def cossim(a, b):
return CosSim()(a, b)[0]
+class Pad(Operator):
+ """
+ Init a pad operator
+ """
+
+ def __init__(self, mode, pads, constant=0.):
+ """
+ Args:
+ mode (string): Supported modes: `constant`(default), `reflect`,
`edge`.
Review comment:
what does reflect and edge mean?
##########
File path: python/singa/autograd.py
##########
@@ -4698,6 +4698,118 @@ def cossim(a, b):
return CosSim()(a, b)[0]
+class Pad(Operator):
+ """
+ Init a pad operator
+ """
+
+ def __init__(self, mode, pads, constant=0.):
+ """
+ Args:
+ mode (string): Supported modes: `constant`(default), `reflect`,
`edge`.
+ pads (list[int]): Tensor of integers indicating the number of
padding elements
Review comment:
pads is not a tensor.. it is a list of int.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]