Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canonicalize Composite{SVD} #389

Closed
mzgubic opened this issue Mar 23, 2021 · 0 comments · Fixed by #390
Closed

Canonicalize Composite{SVD} #389

mzgubic opened this issue Mar 23, 2021 · 0 comments · Fixed by #390
Labels
Composite Related to `Composite` for structured values

Comments

@mzgubic
Copy link
Member

mzgubic commented Mar 23, 2021

Making an issue out of #388

julia> using ChainRules

julia> using LinearAlgebra

julia> x = rand(3, 2);

julia> F = svd(x);

julia> y, pb = rrule(getproperty, F, :V);

julia> c = pb(rand(3, 2))[2]
Composite{SVD{Float64,Float64,Array{Float64,2}}}(V = [0.17383499380772904 0.39005912263976916; 0.45401136256238694 0.857760693263997; 0.5536276381177541 0.3029145326674041],)

julia> canonicalize(c)
ERROR: ArgumentError: Composite fields do not match primal fields.
Composite fields: (:V,). Primal (SVD{Float64,Float64,Array{Float64,2}}) fields: (:U, :S, :Vt)

Will do what Seth said #388 (comment)

@nickrobinson251 nickrobinson251 added the Composite Related to `Composite` for structured values label Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Composite Related to `Composite` for structured values
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants