lrjconan / GRAN

Efficient Graph Generation with Graph Recurrent Attention Networks, Deep Generative Model of Graphs, Graph Neural Networks, NeurIPS 2019
MIT License
469 stars 96 forks source link

Training on IMDB-MULTI dataset #18

Open kongzii opened 3 years ago

kongzii commented 3 years ago

Hello,

when I try to train your model on IMDB-MULTI dataset, it fails on https://github.com/lrjconan/GRAN/blob/master/dataset/gran_data.py#L318 with ValueError: index can't contain negative values.

Could you please advice me on how this can happen and possibly how to fix this?

Thanks

koguhnhyeok commented 1 month ago

The issue occurs in the following code calculation:

pad_size = [self.max_num_nodes - bb['num_nodes'] for bb in batch_pass]

If the max_num_nodes defined in the configuration file does not match the actual maximum number of nodes in the dataset, a negative pad_size value will be generated. This causes an error when passed to the padding function.