Well, you are apparently using an older version of PyTorch, but this shouldn’t be the problem here I think.
However, you should upgrade to the latest stable release, since e.g. Variables and tensors were merged.
You can find the install instructions of the website 4.
Also, you don’t have to reconstruct the criterion in each run.
Move the cr_en_loss = nn.CrossEntropyLoss() above the for loop.
This shouldn’t be the problem either.
Is the loss increase exactly happening after one full epoch?