batching dynamic number of nodes #3770
Unanswered
encorechow
asked this question in
Q&A
Replies: 1 comment
-
This section briefly explains the mini-batching technique used in PyG that is well able to operate on a dynamic number of nodes. The trick is that you concatenate your "agents" in the first dimension (and drop the batch dimension). Let me know if you need any more guidance. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The background is I was running a reinforcement learning task which has a dynamic number of agents. I was trying to build these agents as a graph. In the training phase, I found it seems impossible to batching each sample together since the number of agents was dynamically changing. for example, one sample may has [1(batch size), 3(number of nodes/agents), 1024(feature number)], the other may has [1(batch size), 2(number of nodes/agents), 1024(feature number)]. How could I batching them together for training?
I will be very appreciate if anyone can help me with this.
Beta Was this translation helpful? Give feedback.
All reactions