You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thank you for this helpful library. I am trying to run the Molecular Graph Classification example with a few changes but I am unable to understand the concat op error that I get, below are some details for my specific requirements,
Updates to graph spec: My requirement is for a regression output rather than a classification output, so I update the dtype of 'label' to tf.float32. Further, my node set features has size (None, 9) as opposed to (None, 7) in the example. No other changes are made. I also follow the documentation to write the graph to TFRecord format. This allows me to use the example code for input without changes. Below is the full graph spec as I define it:
I use the same _build_model function as provided with the example from the notebook with no changes.
I update the loss and metrics to tf.keras.losses.MeanSquaredError for loss and tf.keras.metrics.RootMeanSquaredError for metric, and pass the two to model.compile appropriately. Since the output of the model is a linear output, I use the logit output as-is with no changes.
I do not have a validation set as this is only a POC to learn the TF-GNN API.
When I run the model.fit function, this is the error I get (truncated for last few line):
Node: 'model_21/graph_update_43/node_set_update_43/simple_conv_44/concat'
ConcatOp : Dimension 0 in both shapes must be equal: shape[0] = [1218,8] vs. shape[1] = [2436,16]
[[{{node model_21/graph_update_43/node_set_update_43/simple_conv_44/concat}}]] [Op:__inference_train_function_125742]
After some trial-and-error, I noticed that commenting out sender_edge_feature=tfgnn.HIDDEN_STATE in SimpleConv for message passing allows the training to work without error, but as I understand the documentation, this means that edge features are not included in the convolutions (which is not desirable). Any pointers on what could be wrong and how I can fix this issue?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hi, thank you for this helpful library. I am trying to run the Molecular Graph Classification example with a few changes but I am unable to understand the concat op error that I get, below are some details for my specific requirements,
(None, 9)
as opposed to(None, 7)
in the example. No other changes are made. I also follow the documentation to write the graph to TFRecord format. This allows me to use the example code for input without changes. Below is the full graph spec as I define it:_build_model
function as provided with the example from the notebook with no changes.tf.keras.losses.MeanSquaredError
for loss andtf.keras.metrics.RootMeanSquaredError
for metric, and pass the two tomodel.compile
appropriately. Since the output of the model is a linear output, I use the logit output as-is with no changes.When I run the
model.fit
function, this is the error I get (truncated for last few line):After some trial-and-error, I noticed that commenting out
sender_edge_feature=tfgnn.HIDDEN_STATE
inSimpleConv
for message passing allows the training to work without error, but as I understand the documentation, this means that edge features are not included in the convolutions (which is not desirable). Any pointers on what could be wrong and how I can fix this issue?Thanks in advance.
The text was updated successfully, but these errors were encountered: