load_labels

class dgl.data.utils.load_labels[source]

Load label dict from file

Parameters

filename (str) – filename to load DGLGraphs

Returns

labels – dict of labels stored in file (empty dict returned if no label stored)

Return type

dict

Examples

Following the example in save_graphs.

>>> from dgl.data.utils import load_labels
>>> label_dict = load_graphs("./data.bin")