I am using DGL for Reinforcement Learning with Graph Classification similar to https://docs.dgl.ai/guide/training-graph.html. Due to the nature of the task I have to instantiate a lot of small graphs which all have the same structure when sampling from the environment.
My graphs all have the same topology, but varying features/weights thus a deep-copy of a template graph and reassigning the features would be sufficient, but this is even slower than using dgl.graph(…) every time. The copy method of DGLGraph will not work since property references are then shared between instances. Is there another way to speed up this procedure?
Thanks for your help!