cjolivier01 commented on a change in pull request #10679: [MXNET-347] Logical
Operators AND, XOR, OR
URL: https://github.com/apache/incubator-mxnet/pull/10679#discussion_r184205145
##########
File path: tests/python/unittest/test_operator.py
##########
@@ -1581,6 +1581,27 @@ def test_bmin(a, b):
data = gen_broadcast_data(idx=200)
check_bmaxmin_gradient(c, data[0], data[1], 0.001, 1e-2, 1e-3)
+ def test_band(a, b):
+ c = mx.sym.broadcast_logical_and(a, b)
+ check_binary_op_forward(c, lambda x, y: np.logical_and(x, y),
gen_broadcast_data, mx_nd_func=mx.nd.broadcast_logical_and)
Review comment:
Why aren't there also non-broadcast versions (which will be much faster) and
then you can just name it logical_or and use broadcast in the python when the
shapes don't match similar to NDArray add? Seems cumbersome that the numpy
will be logical_or and for mxnet, you have to remember it's broadcast_logical_or
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services