Replies: 1 comment 1 reply
-
It seems like you are loading your complete graph dataset to CPU memory anyway, so using Your two adjacency matrices are identical, but you cannot infer that via row1, col1, _ = dataset_train[0].adj_t.coo()
row2, col2, _ = dataset_train_load[0].adj_t.coo()
assert row1.tolist() == row2.tolist()
assert col1.tolist() == col2.tolist() |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am trying to implement the neural network of https://github.com/ryanzhangfan/NeuroSAT using Pytorch Geometric, but the loss function is almost always constant. After several attempts of debugging my code, I realised that the loss is constant when I load an already processed dataset and the learning works when I train the network on a freshly created dataset.
This is what my dataset looks like:
(I decided to modify the
_process
method because the dataset is very large and saving every graph as a single file was making the dataloader extremely slow...maybe I did it in the wrong way)And this is how graphs in my dataset are defined:
I've created a script where I first create and process the dataset (
dataset_train = SATDataset(dimacs_dir_train, d)
) and then I create another dataset which should be equal (calleddataset_train_load
), with the only difference being that the samples are loaded from memory.I compared all the attributes of the samples in the two datasets and found out that the adjacency matrices are not equal (even if they seem so).
logger.info(f"ADJ:\n{dataset_train[0].adj_t}")
returnsand
logger.info(f"ADJ:\n{dataset_train_load[0].adj_t}")
returnsHowever if I test these two sparse matrices for equality (
logger.info(f"ADJ:\n{dataset_train[0].adj_t==dataset_train_load[0].adj_t}")
) I get False.Does anybody have an idea of why this is the case and how it could be solved?
Beta Was this translation helpful? Give feedback.
All reactions