I checked my cord.  I noticed that some value was not changed despite for sentence and first value of predicted was not same next value of predicted.
I want to know the way to fix it.
tensor([[-0.2721, -0.0676,  0.4114,  0.4027, -0.5927,  0.3291]],
grad_fn=)
tensor([2])
tensor([0, 1, 0, 0, 0, 0])
tensor([2])
tensor(1)
tensor([[-0.2721, -0.0676,  0.4114,  0.4027, -0.5927,  0.3291]],
grad_fn=)
tensor([2])
tensor([0, 0, 1, 0, 0, 0])
tensor([2])
tensor(2)
correct, total = 0, 0
for s, y_test in test_pairs:
    output = model(s.float()); _, predicted = torch.max(output.data, 1) # ここが違う
    total += 1
    print(output)
    print(predicted)
    print(y_test)
    y_test = torch.argmax(y_test)
    correct += int(predicted == y_test.long())
    accuracy = 100 * correct / total
    print(predicted)
print('Accuracy of logistic regression on test examples: %2f %%\n ' % (100 * correct / total))