Graph Convolutional Neural Network Issues

Hello I am trying to use a GCN layer to perform regression on some data.

My data has 100 nodes and 2 features per node. I tried to interconnect all the nodes to start, but for some reason PyTorch Geometric doesn’t like my edge index matrix.

I am getting the following error:

ValueError: MessagePassing.propagate only supports integer tensors of shape [2, num_messages], torch_sparse.SparseTensor or torch.sparse.Tensor for argument edge_index.

What am I doing wrong?

def make_edge_index(node_size):
    rows = []
    columns = []
    for i in range(node_size):
        for j in range(node_size):
            rows.append(i)
            columns.append(j)
    rows = np.asarray(rows)
    columns = np.asarray(columns)
    index = np.zeros(shape=(2, node_size*node_size))
    index[0,:] = rows
    index[1,:] = columns
    return index

self.input_size = int(node_size/2)
self.output_size = 4
self.edge_matrix = make_edge_index(self.input_size)
self.GCN = geom_nn.conv.GCNConv(2, self.output_size)
self.linear_layer = nn.Linear(node_size, self.input_size)


x = torch.swapaxes(x, 1, 2)
x = x.float()
x = self.linear_layer(x)
# start by scaling down all possible hits using input layer
x = torch.swapaxes(x, 1, 2)
x = self.GCN(x, self.edge_matrix)