Skip to content

In your code, there appears to be an issue with the network structure input for the GCN model. #1

@Sean-Primo-Connery

Description

@Sean-Primo-Connery

Dr. Filip:

I encountered some issues in understanding certain aspects of your codehttps://github.com/maddataanalyst/blogposts_code/blob/main/graph_nns_series/pyg_pyl_perfect_match/pytorch-geometric-lightning-perfect-match.ipynb. For graph neural networks, the input should consist of edges used for message passing. However, in your code, it seems that the edges used for supervised prediction results are being inputted as edges for message passing into the GCN model. I believe that in code block IN 15, the first line under the _step function should be: yhat_edge = self(batch.x, batch.edge_index, batch.edge_label_index).squeeze(). Simultaneously, corresponding adjustments should also be made to the forward function.

Below is an example of a batch of data from the train_loader, which can substantiate my idea.

Data(x=[1708, 2879], edge_index=[2, 3462], y=[1708], edge_label=[256], edge_label_index=[2, 256], n_id=[1708], e_id=[3462], input_id=[128])

I am a novice, hence uncertain about the correctness of my idea, seeking your guidance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions