thanks for your answer, before I have used :labels = Variable(labels).cuda(),
error also exist as:AttributeError: ‘torch.cuda.LongTensor’ object has no attribute 'requires_grad’
this error location:
loss = criterion(outputs, predicted)
I also used :  labels.data = predicted, occur other errors!