lukasjf / contrastive-gnn-explanation

18 stars 1 forks source link

pytorch_geometric.explain implementation #17

Open mmpust opened 1 year ago

mmpust commented 1 year ago

Hi Lukas,

very interesting approach! Is there any plan to incorporate this into the pytorch_geometric.explain module in the future? https://pytorch-geometric.readthedocs.io/en/latest/modules/explain.html

# Your code:
# Create explainer
    explainer = explain.Explainer(
        model=model,
        adj=cg_dict["adj"],
        feat=cg_dict["feat"],
        label=cg_dict["label"],
        pred=cg_dict["pred"],
        train_idx=cg_dict["train_idx"],
        args=prog_args,
        writer=writer,
        print_training=True,
        graph_mode=graph_mode,
        graph_idx=prog_args.graph_idx,
    )

My input graphs are PyTorch Data objects, e.g. Data(x=x, edge_index=edge_index, ...) Is there an straightforward way to test your contrast method on this input type? Thanks!