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
The ScaledPlan like e.g. the result of plan_fft has no field region, leading to an error when attempting to AD it via Zygote. Zygote (which depends on AbstractFFT) is requiring a region subfield.
Example
beginusing Flux
using Zygote
using LinearAlgebra
using FFTW
end
N =15
data =rand(Float64, N)
FT =plan_fft(data) # e.g. plan_dct / plan_idct would work
iFT=plan_ifft(data)
m =Chain(x->FT*x, Dense(N,N), x->iFT*x)
loss(x,y) =sum(abs2,m(x) .- y)
loss(data,data) # precompile
grads =gradient(() ->loss(data, data), params(m))