Closed cseekeepmoving closed 1 year ago
您好!针对画分布图的这段代码,
ue = open('user', 'rb') user = pickle.load(ue) udx = np.random.choice(len(user), 2000) embs = ['user_lgcn.emb', 'user_sgl.emb', 'user_simgcl.emb'] models = ['LightGCN','SGL-ED','SimGCL'] data = {}
想请教下SimGCL中的分布图画法中的user embedding和item embedding是被优化后的初始embedding:
def _init_model(self): initializer = nn.init.xavier_uniform_ embedding_dict = nn.ParameterDict({ 'user_emb': nn.Parameter(initializer(torch.empty(self.data.user_num, self.emb_size))), 'item_emb': nn.Parameter(initializer(torch.empty(self.data.item_num, self.emb_size))), }) return embedding_dict
还是说经过模型forward后得到的user embedding和item embedding呢
训练完毕之后的经过卷积的final embedding
好的,非常感谢!
您好!针对画分布图的这段代码,
想请教下SimGCL中的分布图画法中的user embedding和item embedding是被优化后的初始embedding:
还是说经过模型forward后得到的user embedding和item embedding呢