bouncing-decayer-optimizer


Namebouncing-decayer-optimizer JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryA physics-inspired optimizer adding decaying oscillations to gradient descent
upload_time2025-07-30 09:51:53
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT License Copyright (c) 2025 Sanskar Sawane(sandy1279) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords optimizer deep learning physics-inspired gradient descent pytorch
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Bouncing Decayer Optimizer

> A physics-inspired optimizer for PyTorch — adding decaying oscillations like a bouncing ball.

Gradient descent is great — but it can get stuck or converge too fast.  
This optimizer adds a **decaying sinusoidal perturbation**:
- Early → big "bounces" help explore.
- Later → oscillations fade, optimizer settles.

## 🧰 Usage SOON (Pypi verification pending)
```python
from bouncing_decayer_optimizer import BouncingDecayerOptimizer
import torch

model = torch.nn.Linear(10, 1)
optimizer = BouncingDecayerOptimizer(model.parameters(), lr=0.01)

for epoch in range(100):
    optimizer.zero_grad()
    inputs = torch.randn(32, 10)
    targets = torch.randn(32, 1)
    outputs = model(inputs)
    loss = torch.nn.functional.mse_loss(outputs, targets)
    loss.backward()
    optimizer.step()
    print(f"Epoch {epoch}, Loss: {loss.item()}")

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bouncing-decayer-optimizer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "optimizer, deep learning, physics-inspired, gradient descent, pytorch",
    "author": null,
    "author_email": "Sanskar <sawanesanskar07@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/eb/a1/df42a33db3b74efa10edf0bf556b5a08a36191609b522b062638a0a52362/bouncing_decayer_optimizer-1.0.0.tar.gz",
    "platform": null,
    "description": "# Bouncing Decayer Optimizer\n\n> A physics-inspired optimizer for PyTorch \u2014 adding decaying oscillations like a bouncing ball.\n\nGradient descent is great \u2014 but it can get stuck or converge too fast.  \nThis optimizer adds a **decaying sinusoidal perturbation**:\n- Early \u2192 big \"bounces\" help explore.\n- Later \u2192 oscillations fade, optimizer settles.\n\n## \ud83e\uddf0 Usage SOON (Pypi verification pending)\n```python\nfrom bouncing_decayer_optimizer import BouncingDecayerOptimizer\nimport torch\n\nmodel = torch.nn.Linear(10, 1)\noptimizer = BouncingDecayerOptimizer(model.parameters(), lr=0.01)\n\nfor epoch in range(100):\n    optimizer.zero_grad()\n    inputs = torch.randn(32, 10)\n    targets = torch.randn(32, 1)\n    outputs = model(inputs)\n    loss = torch.nn.functional.mse_loss(outputs, targets)\n    loss.backward()\n    optimizer.step()\n    print(f\"Epoch {epoch}, Loss: {loss.item()}\")\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Sanskar Sawane(sandy1279)\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \u201cSoftware\u201d), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in\n        all copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n        THE SOFTWARE.\n        ",
    "summary": "A physics-inspired optimizer adding decaying oscillations to gradient descent",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/sandy1279/bouncing_decayer_optimizer",
        "Repository": "https://github.com/sandy1279/bouncing_decayer_optimizer"
    },
    "split_keywords": [
        "optimizer",
        " deep learning",
        " physics-inspired",
        " gradient descent",
        " pytorch"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8696f2a2fddcfe310fee0cfec81ead40d80d2b9becfa31c09376d9cbe955dc77",
                "md5": "ffea01354f18d1200e762b64f0c963dd",
                "sha256": "ba296b7549fc3813e0ee9a945d59bc2594e39d8aaa93a1007331df7558e5a62a"
            },
            "downloads": -1,
            "filename": "bouncing_decayer_optimizer-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ffea01354f18d1200e762b64f0c963dd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4315,
            "upload_time": "2025-07-30T09:51:53",
            "upload_time_iso_8601": "2025-07-30T09:51:53.019355Z",
            "url": "https://files.pythonhosted.org/packages/86/96/f2a2fddcfe310fee0cfec81ead40d80d2b9becfa31c09376d9cbe955dc77/bouncing_decayer_optimizer-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "eba1df42a33db3b74efa10edf0bf556b5a08a36191609b522b062638a0a52362",
                "md5": "c3bd90dabeb809f44a4bcaf866c53631",
                "sha256": "d07c6c6ca02c5933a47ef7c9cec11ea1bacfbe45c60b3717e7249f10b5e79835"
            },
            "downloads": -1,
            "filename": "bouncing_decayer_optimizer-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c3bd90dabeb809f44a4bcaf866c53631",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 3277,
            "upload_time": "2025-07-30T09:51:53",
            "upload_time_iso_8601": "2025-07-30T09:51:53.980830Z",
            "url": "https://files.pythonhosted.org/packages/eb/a1/df42a33db3b74efa10edf0bf556b5a08a36191609b522b062638a0a52362/bouncing_decayer_optimizer-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-30 09:51:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sandy1279",
    "github_project": "bouncing_decayer_optimizer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "bouncing-decayer-optimizer"
}
        
Elapsed time: 1.59979s