Open Liuxx21 opened 5 years ago
I think the code can be corrected by adding this:
self.aggregator.gcn = gcn
and this is when i try to see the gcn flag of enc1 and agg1
I think so too. After reading the paper carefully, the gcn-type aggregation method should include its own nodes.
As you said, the two GCNs do not correspond. When defining the agg aggregate function, I directly pass in gcn=True to get a higher F1 score, compared with gcn=False
the code in run_cora(), model.py
agg1 = MeanAggregator(features, cuda=True) enc1 = Encoder(features, 1433, 128, adj_lists, agg1, gcn=True, cuda=False) agg2 = MeanAggregator(lambda nodes : enc1(nodes).t(), cuda=False) enc2 = Encoder(lambda nodes : enc1(nodes).t(), enc1.embed_dim, 128, adj_lists, agg2, base_model=enc1, gcn=True, cuda=False)
enc1's gcn flag is set to True, while the agg1's gcn flag is default False and never be set to True in enc1's code.so the self-loop of GCN is not considered in fact.
I wonder if there might be something wrong with it, isn't it?