yusanshi / news-recommendation

Implementations of some methods in news recommendation.
MIT License
241 stars 50 forks source link

关于train.py中标签y的疑问 #27

Closed qq31415926 closed 2 years ago

qq31415926 commented 2 years ago

标签y包括1个正样本和K个负样本,为什么都统一初始化为0呢? y = torch.zeros(len(y_pred)).long().to(device)

yusanshi commented 2 years ago

你好,可以看一下这个 issue https://github.com/yusanshi/news-recommendation/issues/12#issuecomment-851111096