richard:

are there any inf values appearing in your output or loss


I think there are no inf value,
when the code is:
optimizer = torch.optim.SGD(model.parameters(), lr=0.1, momentum=0.0)

for epoch in range(10):
    for i, batch in enumerate(dataloader):
    	output = model(batch)
    	loss = criteria(output)
        print loss
    	optimizer .step()


There are no inf values.