How come Kaggle says here (in the image attached below) that “loss.backward(retain_graph=True)  # doesn’t work with backward hooks”? I didn’t quite understand their explanation, especially since lower down they do call loss.backward() (not pictured but is in the article) and it seems to work. I got this from the kaggle article : https://www.kaggle.com/sironghuang/understanding-pytorch-hooks/notebook 2

Screen Shot 2020-03-22 at 8.53.31 PM1644×1478 288 KB

Thanks so much!