benedekrozemberczki / SimGNN

A PyTorch implementation of "SimGNN: A Neural Network Approach to Fast Graph Similarity Computation" (WSDM 2019).
GNU General Public License v3.0
759 stars 147 forks source link

line 213 of simgnn.py: losses.backward(retain_graph=True) #41

Closed ChengzhiPiao closed 2 years ago

ChengzhiPiao commented 3 years ago

In the process_batch() function of SimGNNTrainer, why is the retain_graph attribute set to be True when conducting loss backward? I'm not that sure about the necessity of this setting.