Thanks, It’s works, but now I got error:
TypeError: iteration over a 0-d tensor

in line:
_, predicted = torch.max(outputs)

    for images, annotations in val_loader:
        images = Variable(images.cuda() if torch.cuda.is_available() else images, requires_grad=True)
        annotations = Variable(annotations.cuda() if torch.cuda.is_available() else annotations)

        outputs = model(images)
        _, predicted = torch.max(outputs)
        total += annotations.size[0]
        correct += (predicted == annotations).sum().item()

Do I have add 1 after outputs for example: _, predicted = torch.max(outputs, 1)?