@@ -227,7 +227,7 @@ def read_node_features(self, fpath, nodes, graphs, fn):
227227 optimizer = optim .Adam (train_params , lr = args .lr , betas = (0.5 , 0.999 ), weight_decay = args .wd )
228228 scheduler = lr_scheduler .MultiStepLR (optimizer , args .lr_decay_steps , gamma = 0.1 ) # dynamic adjustment lr
229229 # loss_fn = F.nll_loss # when model is gcn_origin or gat, use this
230- loss_fn = F .cross_entropy # when model is gcn_modify or mgcn , use this
230+ loss_fn = F .cross_entropy # when model is gcn_modify, use this
231231
232232
233233 def train (train_loader ):
@@ -240,7 +240,7 @@ def train(train_loader):
240240 data [i ] = data [i ].to (args .device )
241241 optimizer .zero_grad ()
242242 # output = model(data[0], data[1]) # when model is gcn_origin or gat, use this
243- output = model (data ) # when model is gcn_modify or mgcn , use this
243+ output = model (data ) # when model is gcn_modify, use this
244244 loss = loss_fn (output , data [4 ])
245245 loss .backward ()
246246 optimizer .step ()
@@ -267,7 +267,7 @@ def test(test_loader):
267267 for i in range (len (data )):
268268 data [i ] = data [i ].to (args .device )
269269 # output = model(data[0], data[1]) # when model is gcn_origin or gat, use this
270- output = model (data ) # when model is gcn_modify or mgcn , use this
270+ output = model (data ) # when model is gcn_modify, use this
271271 loss = loss_fn (output , data [4 ], reduction = 'sum' )
272272 test_loss += loss .item ()
273273 n_samples += len (output )
0 commit comments