FrozenGene commented on a change in pull request #5461:
URL: https://github.com/apache/incubator-tvm/pull/5461#discussion_r417832135
##########
File path: python/tvm/relay/frontend/mxnet.py
##########
@@ -1712,6 +1712,33 @@ def _get_bias_requantize_scale(_inputs, _data_scale,
_kernel_scale):
res = _op.nn.relu(res)
return res
+
+def _mx_broadcast_to(inputs, attrs):
+ data = inputs[0]
+ tgt_shape = attrs.get_int_tuple("shape", [])
+
+ return _op.broadcast_to(data, tgt_shape)
+
+
+def _mx_logical_not(inputs, input_types):
+ data = inputs[0]
+ dtype = _infer_type(data).checked_type.dtype
+ data = _op.cast(data, "bool") if dtype != "bool" else data
+
+ return _op.cast(_op.logical_not(data), dtype)
+
+
+def _mx_broadcast_logical(logical_op):
+ def impl(inputs, input_types):
+ dtype0 = _infer_type(inputs[0]).checked_type.dtype
Review comment:
code style. MXNet frontend names the variable as `dtype_0` style. Maybe
we also could consider more meaningful name, like `lhs_dtype`.
----------------------------------------------------------------
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]