What you write means the following
g = gradient(z-> mse(z.(x),y), model)
You take the gradient of the anonymous function with respect to its input in the point model
What you write means the following
g = gradient(z-> mse(z.(x),y), model)
You take the gradient of the anonymous function with respect to its input in the point model