Do you need to set `retain_graph=True`?
Author: tengeryeCreated Dec 6, 2024Updated Dec 6, 2024
Hi,
I think you should use retain_graph=True here, because otherwise, the graph will be freed from there and update of value function will not affect the update of the actor.
Source: lucidrains/PaLM-rlhf-pytorch