baby-a3c
baby-a3c copied to clipboard
Why sync grad only when grad in None
The shared_param.grad is synced only when it is None here https://github.com/greydanus/baby-a3c/blob/master/baby-a3c.py#L159. I am kind of confused. I think we have to sync it without the condition above. That means we have to sync it whenever the local model calculates a grad. Is it auto synced somewhere? Thank you for your time
i think it gets synched in A2C when all parallel agents calculate their V(s) and π(a|s), no?