I implemented the architecture described in this blog post. It is a 9-layer ResNet (He et al. 2015) for image classification on CIFAR-10 (Krizhevsky 2009).
from resnet import ResNet
net = ResNet()
net.train(save_dir='saves', num_epochs=75, batch_size=256, learning_rate=0.001, verbose=True)
accuracy = net.test()
print('Test accuracy: {}'.format(accuracy))
from resnet import ResNet
net = ResNet()
net.load_parameters(path='saves/resnet__epoch_75.pth')
accuracy = net.test()
print('Test accuracy: {}'.format(accuracy))
Hyperparameter | Value |
---|---|
Number of Epochs | 75 |
Batch Size | 256 |
Learning Rate | 0.001 |
Weight Decay (Adam) | 1e-5 |
Training accuracy | Test accuracy |
---|---|
97.64 % | 92.05 % |
Kaiming H, Zhang X, Ren S, and Sun J. (2016). Deep Residual Learning for Image Recognition. Conference on Computer Vision and Pattern Recognition (CVPR).
Krizhevsky A. (2009). Learning multiple layers of features from tiny images. Technical Report.
This project is licensed under the MIT Licence