Thank you for elaborating. So, accuracy is only be calcualted as correctness/len(data). However, loss is something like probablity. could you pls explain more, how loss is accumulated in first epoch, suppose it has 20 batches. and how could i print(test loss) according to the code below.
`
    def train(epoch):
    model.train()
    for data in train_loader:
    data = data.to(device)
    optimizer.zero_grad()
    loss = F.nll_loss(model(data), data.y)
    loss.backward()
    optimizer.step()

def test(loader):
model.eval()

correct = 0
for data in loader:
    data = data.to(device)

    with torch.no_grad():
        pred = model(data).max(1)[1]
    correct += pred.eq(data.y).sum().item()
return correct / len(loader.dataset)`