MuZeroJupyterExample icon indicating copy to clipboard operation
MuZeroJupyterExample copied to clipboard

network structure and training

Open ZHANGRUI666 opened this issue 6 years ago • 2 comments

respected author: i have a puzzle that the three components: representation and dynamics as well as prediction network are constructed in one big conv network? if they work seperately ,how to train them jointly and in 'end to end' fashion? can you figure it out?

ZHANGRUI666 avatar Dec 06 '19 03:12 ZHANGRUI666

Hi, Constructing one big net is not necessary in this case. You can tell an optimizer the whole parameters to train. Following code will work.


rep, dyn, pre = Rep(), Dyn(), Pre() params = list(rep.parameters()) + list(dyn.parameters()) + list(pre.parameters()) opt = optim.SGD(params, lr=1e-3)

... (forward and backward computation in the same way)

YuriCat avatar Dec 06 '19 11:12 YuriCat

So cute! your reply helps me a lot and the program is exellent 😀

ZHANGRUI666 avatar Dec 07 '19 01:12 ZHANGRUI666