dgl.NodeFlow.copy_to_parent

NodeFlow.copy_to_parent(node_embed_names='__ALL__', edge_embed_names='__ALL__')[source]

Copy node/edge embeddings to the parent graph.

Note: if a node in the parent graph appears in multiple layers and they in the NodeFlow has node data with the same name, the data of this node in the lower layer will overwrite the node data in previous layer.

For example, node 5 in the parent graph appears in layer 0 and 1 and they have the same node data ‘h’. The node data in layer 1 of this node will overwrite its data in layer 0 when copying the data back.

To avoid this, users can give node data in each layer a different name.

Parameters:
  • node_embed_names (a list of lists of strings, optional) – The names of embeddings in each layer.
  • edge_embed_names (a list of lists of strings, optional) – The names of embeddings in each block.