Global operations on batches with bipartite data + num_nodes #10205
Unanswered
thistlillo
asked this question in
Q&A
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working with bipartite graphs, with training based on mini-batches of examples.
This is a MWE that highlights the problem I am encountering in my 'real' code:
whose output is:
I do not understand two things:
Why do I get "UserWarning: Unable to accurately infer 'num_nodes' from the attribute set '{'l', 'x_right', 'fid', 'h', 'x_edge', 'n_right', 'n_left', 'edge_index', 'x_left'}'. Please explicitly set 'num_nodes' as an attribute of 'data' to suppress this warning
warnings.warn(" ? Shouldn't the property
@property def num_nodes(self): ...
avoid that warning?This error message:
The expanded size of the tensor (8) must match the existing size (13) at non-singleton dimension 0. Target sizes: [8, 16]. Tensor sizes: [13, 1]
How am I supposed to perform global, graph-level operations on the two sets of nodes in the bipartite graph?
Using:
with Python 3.10.15
on Linux.
Beta Was this translation helpful? Give feedback.
All reactions