This repo contains the PyTorch implementation of GCN-CCP.
Here we use synthetic graphs generated by stochastic block models (SBM) as an example.
cd amortized_community_detection
# GCN-CCP with GraphSAGE encoder
python -m acp.train_acp --model_name acp --data_type sbm_beta_crp --encoder_type graphsage
# GCN-CCP with GatedGCN encoder
python -m acp.train_acp --model_name acp --data_type sbm_beta_crp --encoder_type gatedgcn
# Cluster SBM graphs using a saved checkpoint
python -m acp.inference.acp_cluster_sbm --data_type sbm_beta_crp --encoder_type graphsage \
--model_file ./saved_models/xxxx.pt
python -m acp.train_acp --model_name mog --data_type mog --encoder_type mog