Skip to content

WIP: changes needed to support testing of projected tangents#178

Closed
mzgubic wants to merge 1 commit into
masterfrom
mz/project-requirements
Closed

WIP: changes needed to support testing of projected tangents#178
mzgubic wants to merge 1 commit into
masterfrom
mz/project-requirements

Conversation

@mzgubic

@mzgubic mzgubic commented Jun 22, 2021

Copy link
Copy Markdown
Member

JuliaDiff/ChainRulesCore.jl#380 and JuliaDiff/ChainRules.jl#453 project the tangents in the rules on the correct type. An example is for Diagonal * Matrix, the tangent of Diagonal is a Diagonal, not a Matrix (as it used to be so far).

When we project the tangent to a Diagonal all the off-diagonal elements become zero. To test these, also the finite differencing must only perturb the diagonal elements of the Diagonal, and not densify it as it does now.

I think the reason why the to_vec(::Diagonal) used to densify the Diagonal is to be able to test those rules anyway, so this is reverting the hack if I understand this correctly?

@oxinabox

Copy link
Copy Markdown
Member

This seems valid either way.

@willtebbutt

Copy link
Copy Markdown
Member

Seems good. This is technically breaking though.

@mzgubic

mzgubic commented Jul 27, 2021

Copy link
Copy Markdown
Member Author

#186

@mzgubic mzgubic closed this Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants