{"id":13562368,"url":"https://github.com/davidcpage/cifar10-fast","last_synced_at":"2025-04-03T18:33:29.938Z","repository":{"id":33268877,"uuid":"151074498","full_name":"davidcpage/cifar10-fast","owner":"davidcpage","description":null,"archived":false,"fork":false,"pushed_at":"2021-12-30T07:27:37.000Z","size":2265,"stargazers_count":531,"open_issues_count":10,"forks_count":119,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-04T14:45:02.575Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidcpage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-01T11:00:09.000Z","updated_at":"2024-09-05T14:02:28.000Z","dependencies_parsed_at":"2022-07-16T07:46:50.740Z","dependency_job_id":null,"html_url":"https://github.com/davidcpage/cifar10-fast","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcpage%2Fcifar10-fast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcpage%2Fcifar10-fast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcpage%2Fcifar10-fast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcpage%2Fcifar10-fast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidcpage","download_url":"https://codeload.github.com/davidcpage/cifar10-fast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247057037,"owners_count":20876501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:01:07.869Z","updated_at":"2025-04-03T18:33:24.928Z","avatar_url":"https://github.com/davidcpage.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook","Tutorials \u0026 books \u0026 examples｜教程 \u0026 书籍 \u0026 示例","Tutorials, books, \u0026 examples"],"sub_categories":["Other libraries｜其他库:","Other libraries:"],"readme":"# cifar10-fast\n\nDemonstration of training a small ResNet on CIFAR10 to 94% test accuracy in 79 seconds as described [in this blog series](https://www.myrtle.ai/2018/09/24/how_to_train_your_resnet/).\n\n\u003cimg src=\"net.svg\"\u003e\n\nInstructions to reproduce on an `AWS p3.2xlarge` instance:\n- setup an instance with AMI: `Deep Learning AMI (Ubuntu) Version 11.0` (`ami-c47c28bc` in `us-west-2`) \n- ssh into the instance: `ssh -i $KEY_PAIR ubuntu@$PUBLIC_IP_ADDRESS -L 8901:localhost:8901`\n- on the remote machine\n    - `source activate pytorch_p36`\n    - `pip install pydot` (optional for network visualisation)\n    - `git clone https://github.com/davidcpage/cifar10-fast.git`\n    - `jupyter notebook --no-browser --port=8901`\n - open the jupyter notebook url in a browser, open `demo.ipynb` and run all the cells\n\n In my test, 35 out of 50 runs reached 94% test set accuracy with a median of 94.08%. Runtime for 24 epochs is roughly 79s.\n\n A second notebook `experiments.ipynb` contains code to reproduce the main results from the [posts](https://www.myrtle.ai/2018/09/24/how_to_train_your_resnet/).\n\nNB: `demo.ipynb` also works on the latest `Deep Learning AMI (Ubuntu) Version 16.0`, but some examples in `experiments.ipynb` trigger a core dump when using TensorCores in versions after `11.0`.\n \n## DAWNBench \n To reproduce [DAWNBench](https://dawn.cs.stanford.edu/benchmark/index.html#cifar10-train-time) timings, setup the `AWS p3.2xlarge` instance as above but instead of launching a jupyter notebook on the remote machine, change directory to `cifar10-fast` and run `python dawn.py` from the command line. Timings in DAWNBench format will be saved to `logs.tsv`. \n \n Note that DAWNBench timings do not include validation time, as in [this FAQ](https://github.com/stanford-futuredata/dawn-bench-entries), but do include initial preprocessing, as indicated [here](https://groups.google.com/forum/#!topic/dawn-bench-community/YSDRTOLMaMU). DAWNBench timing is roughly 74 seconds which breaks down as 79s (as above) -7s (validation)+ 2s (preprocessing).\n\n## Update 4th Dec 2018\n- Core functionality has moved to `core.py` whilst PyTorch specific stuff is in `torch_backend.py` to allow easier experimentation with different frameworks.\n- Stats (loss/accuracy) are collected on the GPU and bulk transferred to the CPU at the end of each epoch. This speeds up some experiments so timings in `demo.ipynb` and `experiments.ipynb` no longer match the blog posts.\n\n \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidcpage%2Fcifar10-fast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidcpage%2Fcifar10-fast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidcpage%2Fcifar10-fast/lists"}