LOLA_DiCE
LOLA_DiCE copied to clipboard
value.detach() in dice_objective function
Hello. First of all, thank you for sharing this code. It greatly helped me understand the paper deeper! :+1:
I have noticed that the value function is used to reduce the variance in the dice objective computation. Because the loss for the value function is separately computed by line 148 and optimized by value_update
function, wouldn't it be needed to detach the value in line 47, dice_objective
function (i.e., values = torch.stack(self.values, dim=1) .detach()
)?
Because the value function is not detached and the dice loss includes the computation graph of the value function, I noticed that the value function can be updated via the theta_update
function.
Thank you for your time and consideration! :-)
https://github.com/alexis-jacq/LOLA_DiCE/blob/ec3f3f620a67df0a3e72f8e9227d09e4543dbb99/ipd_DiCE.py#L148
https://github.com/alexis-jacq/LOLA_DiCE/blob/ec3f3f620a67df0a3e72f8e9227d09e4543dbb99/ipd_DiCE.py#L47