Metadata-Version: 2.4
Name: bouncing-decayer-optimizer
Version: 1.0.0
Summary: A physics-inspired optimizer adding decaying oscillations to gradient descent
Author-email: Sanskar <sawanesanskar07@gmail.com>
License: MIT 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.
        
Project-URL: Homepage, https://github.com/sandy1279/bouncing_decayer_optimizer
Project-URL: Repository, https://github.com/sandy1279/bouncing_decayer_optimizer
Keywords: optimizer,deep learning,physics-inspired,gradient descent,pytorch
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=1.7
Dynamic: license-file

# 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()}")
