-
-
Notifications
You must be signed in to change notification settings - Fork 216
Open
Description
These two invocations of the adjoint macro seem a little too general given it's not true for the (unitary) DCT plan FFTW.DCTPlan{Float64,5,false} <: AbstractFFTs.Plan{Float64}
Lines 729 to 741 in 956cbcf
| @adjoint function *(P::AbstractFFTs.Plan, xs) | |
| return P * xs, function(Δ) | |
| N = prod(size(xs)[[P.region...]]) | |
| return (nothing, N * (P \ Δ)) | |
| end | |
| end | |
| @adjoint function \(P::AbstractFFTs.Plan, xs) | |
| return P \ xs, function(Δ) | |
| N = prod(size(Δ)[[P.region...]]) | |
| return (nothing, (P * Δ)/N) | |
| end | |
| end |
julia> using FFTW, LinearAlgebra
julia> Id = Matrix{Float64}(I, 10, 10);
julia> p = plan_dct(Id, 1)
FFTW DCT (DCT-II) plan for 10×10 array of Float64
julia> P = p*Id;
julia> N = prod(size(Id)[[p.region...]])
10
julia> P' ≈ N*inv(P)
false
It's probably false for some of the real-to-real plans as well.
Metadata
Metadata
Assignees
Labels
No labels