{"id":18745575,"url":"https://github.com/vpanjeta/audio-based-train-debugging","last_synced_at":"2026-04-26T20:32:28.049Z","repository":{"id":216017191,"uuid":"200587518","full_name":"VPanjeta/Audio-based-train-debugging","owner":"VPanjeta","description":"Debugging or analyzing neural network training by generating audio samples wrt model gradients","archived":false,"fork":false,"pushed_at":"2019-08-05T06:22:15.000Z","size":3020,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-20T08:08:11.359Z","etag":null,"topics":["neural-network","pyaudio","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","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/VPanjeta.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-08-05T05:23:30.000Z","updated_at":"2020-08-06T04:11:13.000Z","dependencies_parsed_at":"2024-01-08T02:11:03.211Z","dependency_job_id":"bfd99f4c-b69a-4820-ab57-4577bab23b61","html_url":"https://github.com/VPanjeta/Audio-based-train-debugging","commit_stats":null,"previous_names":["vpanjeta/audio-based-train-debugging"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VPanjeta/Audio-based-train-debugging","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VPanjeta%2FAudio-based-train-debugging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VPanjeta%2FAudio-based-train-debugging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VPanjeta%2FAudio-based-train-debugging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VPanjeta%2FAudio-based-train-debugging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VPanjeta","download_url":"https://codeload.github.com/VPanjeta/Audio-based-train-debugging/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VPanjeta%2FAudio-based-train-debugging/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32312308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T19:15:34.056Z","status":"ssl_error","status_checked_at":"2026-04-26T19:15:15.467Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["neural-network","pyaudio","pytorch"],"created_at":"2024-11-07T16:18:42.804Z","updated_at":"2026-04-26T20:32:28.030Z","avatar_url":"https://github.com/VPanjeta.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Audio based neural network debugging\nDebugging and analyzing neural network training based on audio generated corresponding to gradients during training time.  \n\nDoing this project because I have a lot of time on my hands and it seemed like a good idea to pass my time. :neutral_face:\n\n## Generated Samples:\nMost of the generated samples have been on SGD using variable learning rates.  \nThe training has been done on a four layer NN for 200 steps in one pass using a small batch size(20)  \nHigher norms are indicated with higher pitch of the sound. In most cases the pitch increases to indicate the increase in gradient over time.\n\n### LR: 0.01\n\nAudio Sample: [lr_0.01](/training_audio/sgd_0.01.wav)  \nNotice the pitch increasing slowly over time indicating slow increase in gradients.\n\n### LR: 0.1\n\nAudio Sample: [lr_0.1](/training_audio/sgd_0.1.wav)  \nNotice how the gradients diverge due to higher learning rate and then converge back in again and again as it jumps great distances on the error curve towards minima.  \n\n### LR: 1.0\n\nAudio Sample: [lr_1.0](/training_audio/sgd_1.0.wav)  \nHere you'll see how it diverges the neural network and it doen't converge after that as the gradients explode.\n\n### LR: 1.0 with batch size 256\n\nAudio Sample: [lr_1.0_bs_256](/training_audio/sgd_1.0_bs_256.wav)  \nWarning: this gave me a minor headache.  \nNotice how the batch size increase affects the gradients as they explode instantly and lead to the annoying low pitch thumping sound caused by gradients becoming \"NaN\"\n\n\n## Code Brief\n### Requirements\nRequirements are listed in `requirements.txt` file. The project requires PyTorch along with Torchvision and PyAudio.  \nRequirements can be installed as `pip install -r requirements.txt`\n\n### Files\n1. `model.py`: Model architecture file. By default takes batch size as 20. can be modified a little to generate 256 batch size result as well.  \n2. `utils.py`: Utility functions for opening audio stream and other things.\n3. `main.py`: Main file to run the code. By default generates the three LR based audios for batch size 20.  \nRun the code as `python main.py`\n\n## Conclusion\nThere is nothing of value here, just did this because it seemed like fun. I don't see anyone debugging their training process by analyzing weights using sound over visualizing weights using graphs.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvpanjeta%2Faudio-based-train-debugging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvpanjeta%2Faudio-based-train-debugging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvpanjeta%2Faudio-based-train-debugging/lists"}