baby-a3c icon indicating copy to clipboard operation
baby-a3c copied to clipboard

Why sync grad only when grad in None

Open luochao1024 opened this issue 6 years ago • 1 comments

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

luochao1024 avatar Sep 05 '18 00:09 luochao1024

i think it gets synched in A2C when all parallel agents calculate their V(s) and π(a|s), no?

QasimWani avatar Aug 01 '20 00:08 QasimWani