Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Differentiating through generator I #66

Open
gabrielarpino opened this issue Oct 18, 2017 · 2 comments
Open

Differentiating through generator I #66

gabrielarpino opened this issue Oct 18, 2017 · 2 comments

Comments

@gabrielarpino
Copy link

Error when differentiating through the following line:

screen shot 2017-10-18 at 4 16 58 pm

Output is:

screen shot 2017-10-18 at 4 16 39 pm

Fixed by changing to this:

screen shot 2017-10-18 at 4 17 23 pm

Seems that it has trouble differentiating through generators where it has to infer the size of the matrix, like I for example. Worked if used eye(size(x)) instead.

@gabrielarpino
Copy link
Author

Reproduce the error as follows:

using Nabla
f(x) = x.*I
x = [1, 2]
∇(f)(x)

@willtebbutt
Copy link
Member

See #50 for discussion. Won't close this for now though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants