DGSR
DGSR copied to clipboard
Error occur when setting the long term to orgat and short term to last
Here is the command I used and the execution result:
%run new_main.py --data=Games
--gpu=0
--epoch=20
--hidden_size=50
--batchSize=50
--user_long=orgat
--user_short=last
--item_long=orgat
--item_short=last
--user_update=rnn
--item_update=rnn
--lr=0.001
--l2=0.0001
--layer_num=2
--item_max_length=50
--user_max_length=50
--attn_drop=0.3
--feat_drop=0.3
--record \
RuntimeError Traceback (most recent call last)
/content/drive/MyDrive/TCSS556/DGSR-master/new_main.py in
8 frames /content/drive/MyDrive/TCSS556/DGSR-master/DGSR.py in user_reduce_func(self, nodes) 272 return {'user_h': h[0]} 273 else: --> 274 return {'user_h': self.agg_gate_u(torch.cat(h,-1))} 275 276 def graph_user(bg, user_index, user_embedding):
RuntimeError: Tensors must have same number of dimensions: got 2 and 1
I also have some question about the commend for the model variants. I used the following code for Variants DGSR-G.
'''
%run new_main.py --data=Games
--gpu=0
--epoch=20
--hidden_size=50
--batchSize=50
--user_long=gcn
--user_short=none
--item_long=gcn
--item_short=none
--user_update=rnn
--item_update=rnn
--lr=0.001
--l2=0.0001
--layer_num=2
--item_max_length=50
--user_max_length=50
--attn_drop=0.3
--feat_drop=0.3
--record
'''
And received the following error.
'''
AttributeError Traceback (most recent call last)
/content/drive/MyDrive/TCSS556/DGSR-master/new_main.py in
9 frames /usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in getattr(self, name) 1184 return modules[name] 1185 raise AttributeError("'{}' object has no attribute '{}'".format( -> 1186 type(self).name, name)) 1187 1188 def setattr(self, name: str, value: Union[Tensor, 'Module']) -> None:
AttributeError: 'DGSRLayers' object has no attribute 'agg_gate_u' ''' Is there anything wrong with the arguments I used?
Have you solved the first problem
Have you solved the first problem i also meet the problem, are you solved it?