Type mismatch on CrossEntropyLoss

I found this thread which has a similar issue:

I printed out the types for all my variables and everything is a float. I dont know why it expects a Long tensor all of a sudden. And I cant find any data that is of type Long. I am stuck here, any help would be appreciated it.