Double680 / CrossAug

1 stars 1 forks source link

Question about load model #2

Open 97z opened 1 day ago

97z commented 1 day ago

If I first run this code, there will have an error: Traceback (most recent call last): File "/root/CrossAug/main.py", line 159, in args = init() File "/root/CrossAug/main.py", line 50, in init load_models(args, config[args.approach]) File "/root/CrossAug/main.py", line 76, in load_models args.model = torch.compile(getattr(sys.modules[name], args.approach)(args).to(args.device)) File "/root/CrossAug/models/CrossAug.py", line 53, in init self.adj = args.overall_mat AttributeError: 'Namespace' object has no attribute 'overall_mat' That's because when get_inter_mat(args), the code will not generate the overall_mat unless I have overall_mat.npy before. So I comment the code in CrossAug.py:

self.adj = args.overall_mat

    self.d1_norm_adj, self.d1_user_degree = self.get_norm_adj(self.d1_adj)
    self.d2_norm_adj, self.d2_user_degree = self.get_norm_adj(self.d2_adj)
    #self.norm_adj, self.user_degree = self.get_norm_adj(self.adj)

and it works. If this event will affect the results? Thank you for any reply!

97z commented 1 day ago

It's a great work! I can get the same results in paper.