VGG16 on how the learning rate affects the accuracy effect

Reposted from
Where need to be corrected:
1.

learning_rate = 1e-3  # 学习率

It is better to adjust the learning rate lower, otherwise it is easy to have the correct rate of 10%.
2.
Test model stage: The
original code is:

            img = Variable(img, volatile=True).cuda()
            label = Variable(label, volatile=True).cuda()

An error will appear at this time, just change it as follows:

            with torch.no_grad():
                img = Variable(img).cuda()
                label = Variable(label).cuda()

Guess you like

Origin blog.csdn.net/huatianxue/article/details/109570010