You should be able to do so by using Zygote.pullback() as per the very last code snippet on this page: Training · Flux
1 Like
You should be able to do so by using Zygote.pullback() as per the very last code snippet on this page: Training · Flux