{"id":17153145,"url":"https://github.com/axect/splinelr","last_synced_at":"2025-03-24T13:10:38.660Z","repository":{"id":250635135,"uuid":"835013951","full_name":"Axect/SplineLR","owner":"Axect","description":"Concept for SplineLR","archived":false,"fork":false,"pushed_at":"2024-07-29T07:01:04.000Z","size":1040,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-19T22:17:28.148Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/Axect.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-29T01:27:46.000Z","updated_at":"2024-07-29T07:01:07.000Z","dependencies_parsed_at":"2024-07-29T02:41:49.309Z","dependency_job_id":"b5f8fd29-2c71-4f27-8e8c-b8ea8c4d3001","html_url":"https://github.com/Axect/SplineLR","commit_stats":null,"previous_names":["axect/splinelr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axect%2FSplineLR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axect%2FSplineLR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axect%2FSplineLR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axect%2FSplineLR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Axect","download_url":"https://codeload.github.com/Axect/SplineLR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245276195,"owners_count":20588894,"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-10-14T21:45:24.895Z","updated_at":"2025-03-24T13:10:38.639Z","avatar_url":"https://github.com/Axect.png","language":"Rust","readme":"# Cubic Hermite Spline-based Learning Rate Scheduler\n\nThis project implements a concept for a Learning Rate Scheduler using Cubic Hermite Splines to test learning rate decoupling problem.\nThe scheduler provides a smooth transition between initial and final learning rates over the course of training epochs.\n\n## Overview\n\nThe main components of this project are:\n\n1. A `SplineLR` struct that defines the learning rate scheduler.\n2. Functions to generate control points for the splines.\n3. Code to create and evaluate Cubic Hermite Splines.\n4. Visualization of the generated learning rate curves.\n\n## Dependencies\n\nThis project uses the following dependencies:\n\n- `peroxide`: For mathematical operations and plotting. (for plot feature, we need two python libraries: matplotlib \u0026 scienceplots)\n\n## Key Features\n\n- Customizable initial and minimum learning rates.\n- Adjustable number of epochs.\n- Generation of both \"plus\" and \"minus\" spline curves.\n- Logarithmic scaling of learning rates for better visualization.\n- Output of high-quality plots (600 DPI) in PNG format.\n\n## Usage\n\nTo run the code:\n\n1. Ensure you have Rust and the required dependencies installed.\n2. Clone this repository.\n3. Run the code using `cargo run`.\n\nThe program will generate three PNG images (`spline1.png`, `spline2.png`, `spline3.png`) showing different variations of the learning rate curves.\n\n## Visualization\n\nThe code generates three plots, each showing two variations of the learning rate curve:\n\n1. `spline1.png`: Adjustment at the first control point.\n2. `spline2.png`: Adjustment at the second control point.\n3. `spline3.png`: Adjustment at the third control point.\n\nEach plot displays:\n\n- The x-axis representing the training epochs.\n- The y-axis (in logarithmic scale) representing the learning rate.\n- Two curves: one for the \"plus\" variation and one for the \"minus\" variation.\n\n![Spline 1](./spline1.png)\n![Spline 2](./spline2.png)\n![Spline 3](./spline3.png)\n\n## Implementation Details\n\n- The `SplineLR` struct holds the initial parameters: initial learning rate, minimum learning rate, and total number of epochs.\n- The `delta_pt` method calculates the displacement of control points.\n- The `gen_pts` method generates the control points for the splines.\n- The `gen_splines` method creates the Cubic Hermite Splines using the generated control points.\n- The main function sets up the parameters, generates the splines, and creates the visualizations.\n\n## Contributing\n\nContributions to improve or extend this concept are welcome. Please feel free to submit issues or pull requests.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxect%2Fsplinelr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxect%2Fsplinelr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxect%2Fsplinelr/lists"}