tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] kazum commented on a change in pull request #5331: [relay][topi] Add operation relay.nn.dilate() which calls topi.nn.dilate()
Date Thu, 23 Apr 2020 06:36:02 GMT

kazum commented on a change in pull request #5331:
URL: https://github.com/apache/incubator-tvm/pull/5331#discussion_r413546386



##########
File path: python/tvm/relay/op/nn/_nn.py
##########
@@ -458,6 +458,15 @@ def compute_cross_entropy(attrs, inputs, out_dtype):
 reg.register_pattern("nn.cross_entropy", OpPattern.OPAQUE)
 
 
+# dilate
+@reg.register_compute("nn.dilate")
+def compute_dilate(attrs, inputs, out_dtype):
+    return [topi.nn.dilate(inputs[0], attrs.strides)]
+
+reg.register_broadcast_schedule("nn.dilate")
+reg.register_pattern("nn.dilate", OpPattern.OPAQUE)

Review comment:
       I wonder if the op pattern is better to be injective.




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



Mime
View raw message