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
using Optimisers, Reactant
ps = (; a =randn(10),)
ps_ra = Reactant.to_rarray(ps)
st_opt = Optimisers.setup(Optimisers.Adam(0.1), ps_ra)
gs_ra = Reactant.to_rarray((; a =randn(10),))
functionrun_opt!(ps, gs, st)
returnlast(Optimisers.update!(st, ps, gs))
end
ps_ra_copy =deepcopy(ps_ra)
run_opt!_compiled =@compilerun_opt!(ps_ra, gs_ra, st_opt)
ps2 =run_opt!_compiled(ps_ra, gs_ra, st_opt)
ps_ra_copy.a .- ps2.a # Should be different
ps_ra.a .- ps2.a # Should be the same but isn't
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: