diff --git a/ext/OptimisersAdaptExt.jl b/ext/OptimisersAdaptExt.jl index 579a025f..6b157009 100644 --- a/ext/OptimisersAdaptExt.jl +++ b/ext/OptimisersAdaptExt.jl @@ -5,8 +5,9 @@ import Optimisers: Leaf function Adapt.adapt_structure(to, leaf::Leaf) @warn """`Optimisers.Leaf` object does not support device transfer via - `Adapt.jl`. Avoid this by calling `Flux.gpu/cpu` or - `MLDataDevices.cpu_device()/gpu_device()` on the optimiser state object. + `Adapt.jl`. This could lead to incorrect gradient updates. Avoid this by + calling `Flux.gpu/cpu` or `MLDataDevices.cpu_device()/gpu_device()` on the + optimiser state object. """ maxlog=1 rule = Adapt.adapt(to, leaf.rule)