You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@singa.apache.org by GitBox <gi...@apache.org> on 2020/06/14 12:28:21 UTC

[GitHub] [singa] joddiy opened a new pull request #734: add pad operator

joddiy opened a new pull request #734:
URL: https://github.com/apache/singa/pull/734


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [singa] lgtm-com[bot] commented on pull request #734: add pad operator

Posted by GitBox <gi...@apache.org>.
lgtm-com[bot] commented on pull request #734:
URL: https://github.com/apache/singa/pull/734#issuecomment-646499105


   This pull request **introduces 1 alert** when merging d6e71d6602d48abc8b87e7f9693e45c5a341546c into 3ce650392c66e3363a6f2904d66707a8da8219ea - [view on LGTM.com](https://lgtm.com/projects/g/apache/singa/rev/pr-22da2c471d761375c11554dca4135c8da523619c)
   
   **new alerts:**
   
   * 1 for Syntax error


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [singa] lgtm-com[bot] commented on pull request #734: add pad operator

Posted by GitBox <gi...@apache.org>.
lgtm-com[bot] commented on pull request #734:
URL: https://github.com/apache/singa/pull/734#issuecomment-646521911


   This pull request **introduces 1 alert** when merging 1559b27287909aa561e057cb9e57202d53a26a06 into 3ce650392c66e3363a6f2904d66707a8da8219ea - [view on LGTM.com](https://lgtm.com/projects/g/apache/singa/rev/pr-154015e8c9bcd155ab3a7a632f96f8a97bc34f21)
   
   **new alerts:**
   
   * 1 for Wrong number of arguments in a call


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [singa] nudles commented on a change in pull request #734: add pad operator

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [singa] joddiy commented on a change in pull request #734: add pad operator

Posted by GitBox <gi...@apache.org>.
joddiy commented on a change in pull request #734:
URL: https://github.com/apache/singa/pull/734#discussion_r440628400



##########
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:
       fixed, please check the example usage




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [singa] nudles merged pull request #734: add pad operator

Posted by GitBox <gi...@apache.org>.
nudles merged pull request #734:
URL: https://github.com/apache/singa/pull/734


   


----------------------------------------------------------------
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:
users@infra.apache.org