lehduong/Contrastive-Predictive-Coding-in-RL

CPC weights not part of optimizer

Opened this issue · 0 comments

Thank you for a clean implementation of CPC in RL.

One of the query I have is as below:
As you can see in the blow link, the optimizer is only given the weights of the actor-critic model and not the Wk_state. Is this normal or something is missing here?

if acktr:
self.optimizer = KFACOptimizer(actor_critic)
else:
self.optimizer = optim.RMSprop(
actor_critic.parameters(), lr, eps=eps, alpha=alpha)

self.Wk_state = nn.ModuleList([nn.Linear(hidden_dim, hidden_dim, bias=False) for i in range(num_steps)])
self.Wk_state_action = nn.ModuleList([nn.Linear(hidden_dim, hidden_dim, bias=False) for i in range(num_steps)])
self.Wk_state = self.Wk_state.to(device)
self.Wk_state_action = self.Wk_state_action.to(device)

Thanks
Kinal