Adapt.jl icon indicating copy to clipboard operation
Adapt.jl copied to clipboard

ERROR:Mutating arrays, backpass for adapt Float64 -> Float32

Open KirillZubov opened this issue 4 years ago • 1 comments

using Zygote, Adapt #v3.3.0
f(x,p) = sum(sin.(adapt(typeof(p),x).* p))
x = [1.5,2.0]
function testf(p)
    f(x,p)
end
p = [1.5f0,2.0f0]
dp1 = Zygote.gradient(testf,p)
ERROR: Mutating arrays is not supported

KirillZubov avatar Apr 13 '21 20:04 KirillZubov

I'm not sure what the issue is here; this MWE uses Zygote, and reports a Zygote error. Please provide an Adapt-only MWE and describe the issue / the expected behavior.

maleadt avatar Apr 14 '21 06:04 maleadt