Solved by ptrblck in post #2 
              
              
                If you execute the update logic a few times you would be converging the value towards params1 as seen here: 
params1 = {'a': torch.empty(1).uniform_(-100, 100).item()}
dict_params = {'a': torch.empty(1).uniform_(-100, 100).item()}
beta = 0.5

print('target {}\nother {}'.format(params1, dict_params))…