dgl.DGLGraph.node_attr_schemes¶
-
DGLGraph.
node_attr_schemes
()[source]¶ Return the node feature schemes.
Each feature scheme is a named tuple that stores the shape and data type of the node feature
Returns: The schemes of node feature columns. Return type: dict of str to schemes Examples
>>> G = dgl.DGLGraph() >>> G.add_nodes(3) >>> G.ndata['x'] = torch.zeros((3,5)) >>> G.node_attr_schemes() {'x': Scheme(shape=(5,), dtype=torch.float32)}