Skip to content

Commit

Permalink
remove optimize=False from einsum vjp (upstream numpy bug was fixed)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjj committed Feb 21, 2018
1 parent 91dd350 commit f2c1d49
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions autograd/numpy/numpy_vjps.py
Expand Up @@ -523,8 +523,7 @@ def vjp(g):
new_operands = (g,) + rest_of_ops

new_subscripts = new_input_subs + '->' + subs_wrt
# TODO(mattjj): remove optimize=False after github.com/numpy/numpy/issues/10343
return unbroadcast(anp.einsum(new_subscripts, *new_operands, optimize=False), result_meta)
return unbroadcast(anp.einsum(new_subscripts, *new_operands), result_meta)
else: # using (op0, sublist0, op1, sublist1, ..., sublistout) convention
if len(operands) % 2 == 0:
raise NotImplementedError("Need sublistout argument")
Expand Down

2 comments on commit f2c1d49

@dhirschfeld
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: IIUC the new default for 1.14.1 is optimize=False so this change will have no effect on the latest version.

@dhirschfeld
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.