Hi,
There are two things:

create_graph=True means that you want the graph to be created while doing the backward so that the gradients have requires_grad=True.
retain_graph=True means that you don’t want the graph to be deleted because you want to call backward on it again.

Note that create_graph=True forces retain_graph=True.
So in this case, if you plan to do multiple backwards, you should use retain_graph=True. But if you plan to backward through the first backward, you should use create_graph=True.