devforfu / pytorch_playground

PyTorch experiments, demos and tutorials
60 stars 41 forks source link

A problem in training #2

Open fatemeakbari opened 5 years ago

fatemeakbari commented 5 years ago

Hi in forward function you first get users and then movies: def forward(self, users, movies, minmax=None): but in training you first get column 1 which is movies id and then column 0 which is user id: outputs = net(x_batch[:, 1], x_batch[:, 0], minmax) I wanted to know if there is a reason behind this or it is a problem. thank you very much for your time

ahmedbr commented 4 years ago

outputs = net(x_batch[:, 1], x_batch[:, 0], minmax) Just switch between 0 & 1. And everything will be fine.