Solved by ptrblck in post #2 
              
              
                Could you print the dtype of current_label before passing it to torch.as_tensor? 
It seems you are reading mixed object types, which would create this error (i.e. not all your values are represented as a numerical dtype).