You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.
When setting --pretrain as 1 (loading the trained model such as 'lgn-gowalla-3-64.pth.tar'), the initial of lgn model faces the problem:
Traceback (most recent call last):
File "main.py", line 18, in
Recmodel = register.MODELS[world.model_name](world.config, dataset)
File "./LightGCN/code/model.py", line 90, in init
self.__init_weight()
File "./LightGCN/code/model.py", line 112, in _init_weight
self.embedding_user.weight.data.copy(torch.from_numpy(self.config['user_emb']))
KeyError: 'user_emb'
It seems that there is no statement of the config['user_emb'] and config['item_emb'] in world.py or anywhere.
Would you kindly like to tell me how to fix this part? How to load the trained model correctly?
The text was updated successfully, but these errors were encountered:
When setting --pretrain as 1 (loading the trained model such as 'lgn-gowalla-3-64.pth.tar'), the initial of lgn model faces the problem:
Traceback (most recent call last):
File "main.py", line 18, in
Recmodel = register.MODELS[world.model_name](world.config, dataset)
File "./LightGCN/code/model.py", line 90, in init
self.__init_weight()
File "./LightGCN/code/model.py", line 112, in _init_weight
self.embedding_user.weight.data.copy(torch.from_numpy(self.config['user_emb']))
KeyError: 'user_emb'
It seems that there is no statement of the config['user_emb'] and config['item_emb'] in world.py or anywhere.
Would you kindly like to tell me how to fix this part? How to load the trained model correctly?
The text was updated successfully, but these errors were encountered: