Hi,
You should upgrade your pytorch version as no Variables are needed anymore.
If your labels is a single python number, you can simply wrap it in a long (or whatever type you criterion expects) tensor as torch.LongTensor([correct_class]).