Hi, I’m trying to update some of my code that uses Flux models and HVPs. With Tracker as the backend (i.e. the old version of Flux), this was possible. I’m unsure how to implement similar functionality with Zygote. Any help would be greatly appreciated!

Below, I’ve written a minimal example implementing (unsuccessfully) a hvp. Any ideas how to get this to work? I’ve been banging my head!

Thanks a lot in advance.

```
using Flux
using Zygote
using Random
student = Chain(
Dense(10, 10, relu),
Dense(10, 10, relu))
teacher = Chain(
Dense(10, 10, relu),
Dense(10, 10, relu))
data = randn(10,100)
loss(stu, dat) = Flux.mse(stu(dat), teacher(dat))
gr = Zygote.gradient(params(student)) do
loss(student,data)
end
some_v = randn!.([p for p in params(student)])
Gvp = () -> sum([dot(gr[p], some_v[k]) for (k,p) in enumerate(params(student))])
Hvp = Zygote.gradient(params(student)) do
Gvp()
end
```

ERROR: Need an adjoint for constructor Base.Iterators.Enumerate{Params}. Gradient is of type Array{Nothing,1}