THUDM / GraphMAE

GraphMAE: Self-Supervised Masked Graph Autoencoders in KDD'22
478 stars 75 forks source link

你好,请问你们遇见过这个问题吗 #51

Closed youshengithub closed 1 year ago

youshengithub commented 1 year ago

发生异常: RuntimeError mat1 and mat2 shapes cannot be multiplied (2708x7 and 256x256) File "/home/youshen/work/GraphMAE/graphmae/models/edcoder.py", line 246, in mask_attr_prediction rep = self.encoder_to_decoder(enc_rep) File "/home/youshen/work/GraphMAE/graphmae/models/edcoder.py", line 229, in forward loss = self.mask_attr_prediction(g, x) File "/home/youshen/work/GraphMAE/main_transductive.py", line 32, in pretrain loss, loss_dict = model(graph, x) File "/home/youshen/work/GraphMAE/main_transductive.py", line 117, in main model = pretrain(model, graph, x, optimizer, max_epoch, device, scheduler, num_classes, lr_f, weight_decay_f, max_epoch_f, linear_prob, logger) File "/home/youshen/work/GraphMAE/main_transductive.py", line 146, in main(args) RuntimeError: mat1 and mat2 shapes cannot be multiplied (2708x7 and 256x256)

THINK2TRY commented 1 year ago

@youshengithub 你好,我们这边没有碰到过类似的错误,从信息看RuntimeError: mat1 and mat2 shapes cannot be multiplied (2708x7 and 256x256),建议检查一下是否是输入数据存在问题。

6niezhiping6 commented 3 months ago

发生异常:RuntimeError mat1 和 mat2 形状无法相乘(2708x7 和 256x256) 文件“/home/youshen/work/GraphMAE/graphmae/models/edcoder.py”, 第 246 行, 在 mask_attr_prediction rep = self.encoder_to_decoder(enc_rep) 文件“/home/youshen/work/GraphMAE/graphmae/models/edcoder.py”, 第 229 行, 在 forward loss = self.mask_attr_prediction(g, x) 文件“/home/youshen/work/GraphMAE/main_transductive.py”, 第 32 行, 在 pretrain loss, loss_dict = model(graph, x) 文件“/home/youshen/work/GraphMAE/main_transductive.py”, 第 117 行, 在 main model = pretrain(model, graph, x, optimizer, max_epoch, device, scheduler, num_classes、lr_f、weight_decay_f、max_epoch_f、linear_prob、logger) 文件“/home/youshen/work/GraphMAE/main_transductive.py”,第 146 行,在 main(args) RuntimeError:mat1 和 mat2 形状无法相乘(2708x7 和 256x256)

I am experiencing the same problem and would like to ask how you solved it?