You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/06/24 01:38:30 UTC

[GitHub] [tvm] schilkunda-amba opened a new pull request #8323: Relay to onnx LRN

schilkunda-amba opened a new pull request #8323:
URL: https://github.com/apache/tvm/pull/8323


   * Added support for LRN operator in relay to onnx conversion
   * Added unit test


-- 
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] [tvm] trevor-m commented on a change in pull request #8323: [Relay to Onnx][LRN]

Posted by GitBox <gi...@apache.org>.
trevor-m commented on a change in pull request #8323:
URL: https://github.com/apache/tvm/pull/8323#discussion_r658113381



##########
File path: python/tvm/contrib/target/onnx.py
##########
@@ -617,6 +617,20 @@ def convert_attributes(cls, attrs):
         return {"value": 1}
 
 
+class LRN(OpConverter):
+    """Operator converter for LRN."""
+
+    @classmethod
+    def convert_attributes(cls, attrs):
+        return {
+            "alpha": attrs.alpha,
+            "beta": attrs.beta,
+            "bias": attrs.bias,
+            "size": attrs.size
+            # axis?

Review comment:
       Remove comment.
   
   It looks like the ONNX LRN op doesn't have an axis parameter, as it always applies to axis 1.
   We should probably add assert somewhere to check that the axis is also 1 in the Relay operator that is being converted?

##########
File path: python/tvm/contrib/target/onnx.py
##########
@@ -617,6 +617,20 @@ def convert_attributes(cls, attrs):
         return {"value": 1}
 
 
+class LRN(OpConverter):
+    """Operator converter for LRN."""
+
+    @classmethod
+    def convert_attributes(cls, attrs):
+        return {
+            "alpha": attrs.alpha,
+            "beta": attrs.beta,
+            "bias": attrs.bias,
+            "size": attrs.size
+            # axis?

Review comment:
       Remove comment.
   
   It looks like the ONNX LRN op doesn't have an axis parameter, as it always applies to axis 1.
   We should probably add assert somewhere to check that the axis is also 1 in the Relay operator that is being converted.




-- 
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] [tvm] trevor-m commented on a change in pull request #8323: [Relay to Onnx][LRN]

Posted by GitBox <gi...@apache.org>.
trevor-m commented on a change in pull request #8323:
URL: https://github.com/apache/tvm/pull/8323#discussion_r658113381



##########
File path: python/tvm/contrib/target/onnx.py
##########
@@ -617,6 +617,20 @@ def convert_attributes(cls, attrs):
         return {"value": 1}
 
 
+class LRN(OpConverter):
+    """Operator converter for LRN."""
+
+    @classmethod
+    def convert_attributes(cls, attrs):
+        return {
+            "alpha": attrs.alpha,
+            "beta": attrs.beta,
+            "bias": attrs.bias,
+            "size": attrs.size
+            # axis?

Review comment:
       Remove comment.
   
   It looks like the ONNX LRN op doesn't have an axis parameter, as it always applies to axis 1.
   Should be add an assert somewhere to check that the axis is also 1 in the Relay operator that is being converted?




-- 
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] [tvm] masahi merged pull request #8323: [Relay to Onnx][LRN]

Posted by GitBox <gi...@apache.org>.
masahi merged pull request #8323:
URL: https://github.com/apache/tvm/pull/8323


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] schilkunda-amba commented on a change in pull request #8323: [Relay to Onnx][LRN]

Posted by GitBox <gi...@apache.org>.
schilkunda-amba commented on a change in pull request #8323:
URL: https://github.com/apache/tvm/pull/8323#discussion_r658286396



##########
File path: python/tvm/contrib/target/onnx.py
##########
@@ -617,6 +617,20 @@ def convert_attributes(cls, attrs):
         return {"value": 1}
 
 
+class LRN(OpConverter):
+    """Operator converter for LRN."""
+
+    @classmethod
+    def convert_attributes(cls, attrs):
+        return {
+            "alpha": attrs.alpha,
+            "beta": attrs.beta,
+            "bias": attrs.bias,
+            "size": attrs.size
+            # axis?

Review comment:
       Have added the axis check.




-- 
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