NBStarry / CGMega

CGMega: dissecting cancer gene module with explainable graph attention network
GNU General Public License v3.0
8 stars 0 forks source link

main.py 333-335行 #2

Open lxiongZ opened 2 months ago

lxiongZ commented 2 months ago

hello,I'm wondering if there's a problem with the code from line 333 to 335 in main.py, shouldn't it be the same as the “valid_loader_list” process below, and isn't the use of “y_score = out[train_mask[:size]].cpu().detach() ”in line 335 a direct way to make the dimensions not size anymore ?

NBStarry commented 2 months ago

Your concern is valid, and your observation is correct. This is a result of an older version of the code that hasn't been refined. However, it doesn't affect the normal functioning of the code because the train_mask obtained in lines 333-335 is a tensor of all 1s (since they are derived from the train_loader).