I can’t seem to update the weights selectively. See below example where x is a set of 3 weights and I want to only update, say the first component. But can’t seem to do so. Is there a way to do that?
x = param(rand(3))
loss() = sum((x .- float.(1:3)).^2)
gs = Tracker.gradient(() -> loss(), params(x))
println(x)
update!(x, -0.01gs[x]) # works
println(x)
println(x[1])
update!(x[1], -0.01gs[x][1]) #doesn't work
println(x[1])