Thank you!
I print the output after updating the parameters, however, the two outputs still different.
    loss = criterion(output, label)
    loss.backward()
    optimizer.step()
    optimizer.zero_grad()
    model.zero_grad()

    print('output', output)

    model.eval()
    with torch.no_grad():
        output = model(data)

    print('output', output)