You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-5Lines changed: 16 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -82,11 +82,22 @@ A major issue for graphs is their flexible size and shape, when using mini-batch
82
82
83
83
### Input
84
84
85
-
Here, for ragged tensors, the nodelist of shape `(batch, None, F)` and edgelist of shape `(batch, None, F')` have one ragged dimension `(None, )`.
86
-
The graph structure is represented by an index-list of shape `(batch, None, 2)` with index of incoming or receiving node `i` and outgoing or sending node `j` as `(i, j)`.
87
-
The first index of incoming node `i` is usually sorted for faster pooling operations, but can also be unsorted.
88
-
Furthermore, the graph is directed, so an additional edge with `(j, i)` is required for undirected graphs.
89
-
A ragged constant can be directly obtained from a list of numpy arrays: `tf.ragged.constant(indices, ragged_rank=1, inner_shape=(2, ))` which yields shape `(batch, None, 2)`.
85
+
Graph tensors for edge-indices or attributes for multiple graphs is passed to the model in form of ragged tensors
86
+
of shape `(batch, None, Dim)` where `Dim` denotes a fixed feature or index dimension.
87
+
Such a ragged tensor has `ragged_rank=1` with one ragged dimension indicated by `None` and is build from a value and partition tensor.
88
+
For example, the graph structure is represented by an index-list of shape `(batch, None, 2)` with index of incoming or receiving node `i` and outgoing or sending node `j` as `(i, j)`.
89
+
Note, an additional edge with `(j, i)` is required for undirected graphs.
90
+
A ragged constant can be easily created and passed to a model:
0 commit comments