Run cluster-gcn example meet error

I run the example code of cluster gcn

It works well first but when I change the argument “model-type” into “GCN”,there is an error of dimention missmatch

Here’s the error infomation
Traceback (most recent call last):
File “”, line 249, in
File “”, line 156, in main
pred = model(cluster)
File “/home/lyx/anaconda3/envs/py37/lib/python3.7/site-packages/torch/nn/modules/”, line 541, in call
result = self.forward(*input, **kwargs)
File “/home/lyx/thesis/reference/dgl-master/examples/pytorch/cluster_gcn/”, line 102, in forward
g.ndata[‘h’] = layer(g)
File “/home/lyx/anaconda3/envs/py37/lib/python3.7/site-packages/torch/nn/modules/”, line 541, in call
result = self.forward(*input, **kwargs)
File “/home/lyx/thesis/reference/dgl-master/examples/pytorch/cluster_gcn/”, line 55, in forward
h =, self.weight)
RuntimeError: size mismatch, m1: [2038 x 1204], m2: [602 x 128] at /opt/conda/conda-bld/pytorch_1570710822989/work/aten/src/TH/generic/THTensorMath.cpp:197

And here are the value of the arguments:

Namespace(batch_size=20, dataset=‘reddit-self-loop’, dropout=0.2, gpu=-1, log_every=100, lr=0.01, model_type=‘GCN’, n_epochs=30, n_hidden=128, n_layers=0, normalize=True, note=‘self-loop-reddit-non-sym-ly3-pp-cluster-2-2-wd-5e-4’, psize=1500, rnd_seed=3, self_loop=True, syn_gnp_n=1000, syn_gnp_p=0.0, syn_nclasses=10, syn_nfeats=500, syn_seed=42, syn_test_ratio=0.5, syn_train_ratio=0.1, syn_type=‘gnp’, syn_val_ratio=0.2, test_batch_size=1000, use_pp=True, use_val=True, val_every=1, weight_decay=0.0)

After examining the code, I find that the only differences between these two models, at least in this implementation, are whether to concatenate the old features with new features before a linear layer. If you feel comfortable, I think we can just remove the option of model_type and keep GraphSAGE only.