Closed patrisaru closed 3 years ago
Hello :) This function copies a model to another model, including parameters and the statistic value buffers of BatchNorm.
But why do you call this function at ddpg.py ? why is necessary? when and why do you use hard_update() in your algorithm? Thanks so much for your answer :)
It's not necessary, it's just used to ensure actor and actor_target have same parameters in the beginning of training.
Hello :)
Could you tell me why is necessary this function and what it do exactly?
def hard_update(target, source): for m1, m2 in zip(target.modules(), source.modules()): m1._buffers = m2._buffers.copy() for target_param, param in zip(target.parameters(), source.parameters()): targetparam.data.copy(param.data)
I do not understand! Thanks so much!