This repository is the first assignment of my AI security course, which is a simple PyTorch implementation of 34 - layer ResNet on CIFAR10.
conda create -n resnet python=3.7
conda activate resnet
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
Please go to the official website and download torch which matches your CUDA version.
CUDA_VISIBLE_DEVICES=0 python run.py
Run the above command. The loss and accuracy of training and testing can be found in result.png.
@inproceedings{he2016deep, title={Deep residual learning for image recognition}, author={He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian}, booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition}, pages={770--778}, year={2016} }