Skip to content

Commit 77c6338

Browse files
committed
update edcoder.py
1 parent 73cdb4c commit 77c6338

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎graphmae/models/edcoder.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,19 +238,18 @@ def mask_attr_prediction(self, g, x):
238238
else:
239239
use_g = pre_use_g
240240

241-
# use_g = pre_use_g
242241
enc_rep, all_hidden = self.encoder(use_g, use_x, return_hidden=True)
243242
if self._concat_hidden:
244243
enc_rep = torch.cat(all_hidden, dim=1)
245244

246245
# ---- attribute reconstruction ----
247246
rep = self.encoder_to_decoder(enc_rep)
248247

249-
if self._decoder_type != "mlp":
248+
if self._decoder_type not in ("mlp", "linear"):
250249
# * remask, re-mask
251-
rep[mask_nodes] = 0 #
250+
rep[mask_nodes] = 0
252251

253-
if self._decoder_type == "mlp":
252+
if self._decoder_type in ("mlp", "liear") :
254253
recon = self.decoder(rep)
255254
else:
256255
recon = self.decoder(pre_use_g, rep)

0 commit comments

Comments
 (0)