pytorch-A3C icon indicating copy to clipboard operation
pytorch-A3C copied to clipboard

About the lock in multiprocess of A3C.

Open liuxz-cs opened this issue 4 years ago • 1 comments

Excuse me, I want to know whether the lock is needed in the multiprocess of A3C. I have saw some codes of the implement of A3C, and sometimes they use a lock when they update the gradient of shared model with the single worker of A3C. So is the usage of the lock necessary?

liuxz-cs avatar Mar 03 '21 07:03 liuxz-cs

I would suggest reading the paper included in the Readme: https://arxiv.org/pdf/1602.01783.pdf. They mention the lock-free approach Hogwild! that can make learning more efficient.

It's probably good for some problems, and worse suited for other problems.

jakkarn avatar May 04 '21 17:05 jakkarn