Questions about code(tensorflow2)operational efficiency
Closed this issue · 4 comments
Dear Authors, Recently I have been studying your papers and code. I would like to extend your work to multi-agent. After some more attempts, I have made some progress in my work, however I have encountered the problem that the gradient of the algorithm is too slow to be updated. In my current scenario, there are a total of 8 independent graph neural networks that need to be updated and trained. Even though I have used gpu for training, it still takes about 30 seconds to perform each round of updates. Since I don't know much about the working mechanism of tensorflow. I would like to ask what is causing this problem and is there any chance to improve it?
Hi @liyuanfeng747 , having 8 GNNs sounds like many parameters to train, so it would explain why the gradient computation takes so much time. Maybe you could try reducing the number of GNNs or making them smaller. Also as a first approach I recommend to run the experiments on very small graphs
Both things you mention should help. If graphs are very small you can also reduce the parameter 'T' (see
Line 64 in 61723d2
thank you very much , i should try these precious advices