Graph classification with tf.data.Dataset

Hello everyone,

I’m using tensorflow as my back-end and I’m interested in using tf.data.Dataset with DGL for speeding up the training.

I’m doing graph classification where at each iteration to graph changes therefore it has to be iterated over.

I’m guessing that because DGLGraph objects are arbitrary objects (instead of tensors or np.arrays) it makes using tf.data.Dataset or tf.keras.utils.Sequence challenging.

I would appreciate any help.

Hi,

I don’t think it’s supported now since graph is an object different from tensor. The underlying structure of the graph is a tuple of tensors but it’s not exposed to user for now. We are considering to expose so in the future for better integration with backend frameworks, but we don’t have a concrete timetable for now

Thank you. I wonder whether there is a way of using tf.datasets with non-tensor objects.