Thanks for the fast reply  .
I’m not sure why they are independent.
The weight decay line is adding the parameter multiplied by -lr*wd to the parameter itself, so it depends on the parameter’s data.
The first line is adding a value to the parameter’s data i.e. changing it.
So the first line is affecting the value to be added in the second line which makes them dependent.
In the following image x denotes the parameter’s data, a denotes the value added in line 1 and b replaces lr*wd

So the updated x is different in the two versions.
Thanks again.