Replies: 2 comments 4 replies
-
Hi, that's weird, are you sure that the dataset actually contains sparse adjacency matrices? You can use |
Beta Was this translation helpful? Give feedback.
-
This isn't quite a solution, but I found that I'm able to just save the weights with |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm trying to train a GeneralGNN and then export it for use at a later time. Below is the flow of my training (not using custom training, just
model.fit
).Right now I'm getting an error because of the fact that the
MessagePassing
layer is expecting aSparseTensor
instead of aTensor
as is being provided, apparently.I'm not sure how to control this because the custom data set I'm using has a SciPy sparse array as the adjacency matrix, so I figured it would work.
In the above code, I'm able to train perfectly fine. I can then predict values that are really accurate. I can save the model.
However, when I go to load it, this is the error I get (above).
I've seen a custom training loop, but the use of
model.fit
is just very handy. Is there anything I can do in the dataset, perhaps, to avoid this error? I converted the adjacent matrix toSparseTensor
and I failed onfit
instead ofload_model
.Beta Was this translation helpful? Give feedback.
All reactions