Solved by Prakhar_Prakash in post #3 
              
              
                Thanks a lot @ptrblck! The loss still doesn’t seem to change. The code doesn’t throw any error but shows the same loss value in each epoch. What could be the possible reason? 
def listwiseloss(output):
  s=0
  b=0
  
  for i in range(n_unique_qid):
    for j in range(list_size[i]-1):
      s=s-outpu…