You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now the error is gone and my code seems to produce correct results. According to NumPy, numpy.dot is the equivalent function for the numpy.ndarray.dot method, so this also seems to align with what the comment says.
Should 'dot' indeed be added to diff_methods, or is this expected behavior?
The text was updated successfully, but these errors were encountered:
Hi, I had the same problem and I think you're right. Especially because when replacing the last line in your code by
autograd.grad(lambda x: cs.dot(x))(x)
(i.e, just swapping x and cs in the function definition) it works as expected.
I do think that 'dot' should be added to the diff_methods, but in the meantime my fix was to just replace the dot by the numpy @ operator. That works in any case.
Looks like
ArrayBox
has not attributedot
, so I can't differentiatex.dot(y)
wrtx
:I managed to fix this by adding
'dot'
todiff_methods
here:autograd/autograd/numpy/numpy_boxes.py
Lines 56 to 64 in e18f656
Now the error is gone and my code seems to produce correct results. According to NumPy,
numpy.dot
is the equivalent function for thenumpy.ndarray.dot
method, so this also seems to align with what the comment says.Should
'dot'
indeed be added todiff_methods
, or is this expected behavior?The text was updated successfully, but these errors were encountered: