title: Index Out of Range in self Error - PyTorch
body: <p>I am building a recommendations engine, using Pytorch under the hood (deep neural networks). Now, that I have a good model, I am trying to generate a table with predictions between user and content like-ability (affinity-score).</p>
  <p>My Input Table of historical interactions</p>
  <pre><code>user_id | content_id
  1       | 23
  1       | 20
  2       | 34
  </code></pre>
  <p>Then, I am converting these columns into tensors:</p>
  <pre><code>users=input['user_id].to_list()
  content=input['content_id].to_list()
  
  #convert to tensors
  user_id_tensor = torch.tensor(user_id)
  content_id_tensor = torch.tensor(content_id)
  
  #prediction using historical data input on the trained model object
  prediction = model.forward(user_id_tensor,content_id_tensor)
  
  Error: Index out of range in self
  </code></pre>
  <p>Any idea what the issue is?</p>