I want to convert my graph data created using pytorch to tensorflow. to train graph neural network using tensorflow library. I am getting ValueError: Dimensions 36 and 78 are not compatible error .How to solve this. My data is like below: [Data(x=[36, 8], edge_index=[2, 78], y=[78]), Data(x=[31, 8], edge_index=[2, 77], y=[77]), Data(x=[17, 8], edge_index=[2, 33], y=[33])]
code I am using:
import tensorflow as tf def convert_to_tf_dataset(data): return tf.data.Dataset.from_tensor_slices((data.x.numpy(), data.edge_index.numpy(), data.y.numpy())) convert_to_tf_dataset(dataset_row[0]) # to convert jsut single data point in the list of dataset.
Error: ValueError: Dimensions 36 and 2 are not compatible
If i try to reshape it it is showing another valueerror Error: ValueError: Dimensions 36 and 78 are not compatible
How to solve this