-
Notifications
You must be signed in to change notification settings - Fork 111
Data dependent branches not working #140
Comments
Hi, The first example is ambiguous. If you replace the namespace with numpy, you will got:
, because both X and Y are arrays, the The second one is same as #139 , where mxnet's operators have poor support for scalar arguments. We will fix this in MXNet. Thanks for the report! |
Thanks for the reply. I am now even more confused with the first example. The following code is given as an example demonstrating features of minpy in README.md, highlighting ''... you freely use the if statement anyway you like.'' import minpy.numpy as np
x = ... # create x array
y = ... # create y array
if x < y:
z = x + y
else:
z = y ** 2 So if only the first element of the returned bool array will be used, then this example is misleading. Looking forward to your fix with the scalar arguments issue, it causes a lot of troubles. |
I see. The example is only for scalar, but not meaningful for arrays. To make it more appropriate for arrays, you should have: import minpy.numpy as np
x = ...
y = ...
if x[0] < y[0]:
z = x + y
else:
z = y ** 2 |
@jermainewang Can you update the image in web-data? Thanks! |
Hi guys, following are some issues with data dependent branching I encountered lately.
The text was updated successfully, but these errors were encountered: