{"id":28156094,"url":"https://github.com/igopalakrishna/resnet18-cifar10-benchmark","last_synced_at":"2025-05-15T07:17:33.166Z","repository":{"id":291159986,"uuid":"941330836","full_name":"igopalakrishna/ResNet18-CIFAR10-Benchmark","owner":"igopalakrishna","description":"This repository contains various experiments using ResNet-18 on the CIFAR-10 dataset, focusing on performance optimization, data loading strategies, and training efficiency. The experiments explore different optimizers (SGD, Adam), number of workers, GPU vs. CPU performance, and PyTorch profiling.","archived":false,"fork":false,"pushed_at":"2025-05-02T18:55:06.000Z","size":6033,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-02T19:39:43.479Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/igopalakrishna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-02T03:06:52.000Z","updated_at":"2025-05-02T18:55:10.000Z","dependencies_parsed_at":"2025-05-02T19:39:46.908Z","dependency_job_id":"a5d3e4c3-5e64-4f6e-90ca-8f07780a0b86","html_url":"https://github.com/igopalakrishna/ResNet18-CIFAR10-Benchmark","commit_stats":null,"previous_names":["igopalakrishna/resnet18-cifar10-benchmark"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igopalakrishna%2FResNet18-CIFAR10-Benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igopalakrishna%2FResNet18-CIFAR10-Benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igopalakrishna%2FResNet18-CIFAR10-Benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igopalakrishna%2FResNet18-CIFAR10-Benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igopalakrishna","download_url":"https://codeload.github.com/igopalakrishna/ResNet18-CIFAR10-Benchmark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292078,"owners_count":22046428,"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":"2025-05-15T07:15:24.169Z","updated_at":"2025-05-15T07:17:33.138Z","avatar_url":"https://github.com/igopalakrishna.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"echo \"# ResNet-18 CIFAR-10 Experimentation\n\n## Overview\nThis repository contains multiple experiments using ResNet-18 on the CIFAR-10 dataset. The experiments compare different optimizers, number of workers, and data loading strategies. The main script to run all experiments is \\`lab2.py\\`.\n\n## Requirements\nEnsure you have the following dependencies installed:\n\\`\\`\\`\npip install torch torchvision\n\\`\\`\\`\n\n## Running the Experiments\nAll experiments can be executed using \\`lab2.py\\` with the \\`--exercise\\` flag.\n\n### Run a Specific Experiment\nTo run a specific experiment (e.g., \\`c5\\`), use:\n\\`\\`\\`\npython lab2.py --exercise c5\n\\`\\`\\`\n\n### Run All Experiments Sequentially\nTo execute all experiments in sequence:\n\\`\\`\\`\npython lab2.py --run_all\n\\`\\`\\`\n\n### Running on CPU or GPU\nBy default, the script runs on CUDA if available. You can specify the device explicitly:\n\\`\\`\\`\npython lab2.py --exercise c5 --device cpu\npython lab2.py --exercise c5 --device cuda\n\\`\\`\\`\n\n### Profiling with PyTorch Profiler\nTo enable profiling for an experiment, add the \\`--profile\\` flag:\n\\`\\`\\`\npython lab2.py --exercise c5 --profile\n\\`\\`\\`\nThis will generate a \\`trace.json\\` file that you can view in Chrome by opening:\n\\`\\`\\`\nchrome://tracing\n\\`\\`\\`\n\n### Additional Command-Line Arguments\n- \\`--epochs\\`: Number of epochs to train (default: 5)\n- \\`--batch_size\\`: Batch size for training (default: 128)\n- \\`--num_workers\\`: Number of data loading workers (default: 8)\n- \\`--lr\\`: Learning rate (default: 0.1)\n- \\`--optimizer\\`: Optimizer to use (\\`sgd\\` or \\`adam\\`)\n\\`\\`\\`\npython lab2.py --exercise c5 --epochs 10 --batch_size 64 --num_workers 4 --lr 0.01 --optimizer adam\n\\`\\`\\`\n\n## File Structure\n- \\`lab2.py\\` - Main driver script to run all experiments.\n- \\`c1.py\\` - Baseline ResNet-18 experiment.\n- \\`c2.py\\` - Optimized training loop.\n- \\`c3.py\\` - I/O optimization analysis.\n- \\`c4.py\\` - Worker comparison.\n- \\`c5.py\\` - GPU vs CPU performance test.\n- \\`c6.py\\` - Optimizer performance comparison.\n- \\`c7.py\\` - Batch normalization study.\n- \\`q3.py\\` - Model parameter counting.\n\n## Viewing Profiling Results\nAfter running an experiment with \\`--profile\\`, you can download \\`trace.json\\` and open it in Chrome:\n\\`\\`\\`\nchrome://tracing\n\\`\\`\\`\n\n## Notes\n- Sometimes, the optimal number of workers varies between 4 and 8 due to system scheduling, CPU contention, and parallelization behavior in different environments.\" \u003e README.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figopalakrishna%2Fresnet18-cifar10-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figopalakrishna%2Fresnet18-cifar10-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figopalakrishna%2Fresnet18-cifar10-benchmark/lists"}