curl icon indicating copy to clipboard operation
curl copied to clipboard

Can we integrate the update_critic function and update_cpc function together?

Open Sobbbbbber opened this issue 3 years ago • 1 comments

Hi, can we integrate the update_critic function and update_cpc function by adding the critic_loss and cpc_loss together? Meanwhile, we only need two optimizers. Is it feasible?

self.cpc_optimizer = torch.optim.Adam([self.CURL.W], lr=encoder_lr) self.critic_optimizer = torch.optim.Adam(self.critic.parameters(), lr=critic_lr, betas=(critic_beta, 0.999)) loss = critic_loss + cpc_loss loss.backward() self.critic_optimizer.step() self.cpc_optimizer.step()

Sobbbbbber avatar Nov 27 '21 10:11 Sobbbbbber

In other words, I want to incorporate update_cpc into the update_critic function. Do you have any suggestions, please?

Sobbbbbber avatar Nov 27 '21 10:11 Sobbbbbber