<div align="center">
<img src="docs/source/proxtorch-logo.jpg" alt="ProxTorch Logo" width="200"/>
# ProxTorch
**Unleashing Proximal Gradient Descent on PyTorch** π
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5748062.svg)](https://doi.org/10.5281/zenodo.4382739)
[![codecov](https://codecov.io/gh/jameschapman19/ProxTorch/graph/badge.svg?token=909RDXcEZK)](https://codecov.io/gh/jameschapman19/ProxTorch)
[![version](https://img.shields.io/pypi/v/ProxTorch)](https://pypi.org/project/ProxTorch/)
[![downloads](https://img.shields.io/pypi/dm/ProxTorch)](https://pypi.org/project/ProxTorch/)
</div>
π **What is ProxTorch?**
Dive into a rich realm of proximal operators and constraints with `ProxTorch`, a state-of-the-art Python library crafted
on PyTorch. Whether it's optimization challenges or the complexities of machine learning, `ProxTorch` is designed for
speed, efficiency, and seamless GPU integration.
## β¨ **Features**
- **π GPU-Boosted**: Experience lightning-fast computations with extensive CUDA support.
- **π₯ PyTorch Synergy**: Naturally integrates with all your PyTorch endeavours.
- **π Expansive Library**: From elemental norms (`L0`, `L1`, `L2`, `Lβ`) to advanced regularizations like Total
Variation and Fused Lasso.
- **π€ User-Friendly**: Jump right in! Intuitive design means minimal disruptions to your existing projects.
## π **Installation**
Getting started with `ProxTorch` is a breeze. Install from PyPI with:
```bash
pip install proxtorch
```
Or install from source with:
```bash
git clone
cd ProxTorch
pip install -e .
```
## π **Quick Start**
Dive in with this straightforward example:
```python
import torch
from proxtorch.operators import L1
# Define a sample tensor
x = torch.tensor([0.5, -1.2, 0.3, -0.4, 0.7])
# Initialize the L1 proximal operator
l1_prox = L1(sigma=0.1)
# Compute the regularization component value
reg_value = l1_prox(x)
print("Regularization Value:", reg_value)
# Apply the proximal operator
result = l1_prox.prox(x)
print("Prox Result:", result)
```
## π **Diverse Proximal Operators**
### **Regularizers**
- **L1**, **L2 (Ridge)**, **ElasticNet**, **GroupLasso**, **TV** (includes TV_2D, TV_3D, TVL1_2D, TVL1_3D), **Frobenius
**
- **Norms**: TraceNorm, NuclearNorm
- **FusedLasso**, **Huber**
### **Constraints**
- **L0Ball**, **L1Ball**, **L2Ball**, **LβBall (Infinity Norm)**, **Frobenius**, **TraceNorm**, **Box**
## π **Documentation**
Explore the comprehensive documentation on [Read the Docs](https://proxtorch.readthedocs.io/en/latest/).
## π **Credits**
`ProxTorch` stands on the shoulders of giants:
- [pyproximal](https://github.com/PyLops/pyproximal)
- [ProxGradPyTorch](https://github.com/KentonMurray/ProxGradPytorch)
- [nilearn](https://github.com/nilearn/nilearn/blob/321494420f95c7a5e2172108400194b37a02e628/nilearn/decoding/proximal_operators.py)
We're thrilled to introduce `ProxTorch` as an exciting addition to the PyTorch ecosystem. We're confident you'll love
it!
## π€ **Contribute to the ProxTorch Revolution**
Got ideas? Join our vibrant community and make `ProxTorch` even better!
## π **License**
`ProxTorch` is proudly released under the [MIT License](LICENSE).
```
Raw data
{
"_id": null,
"home_page": "https://github.com/jameschapman19/proxtorch",
"name": "ProxTorch",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0.0",
"maintainer_email": "",
"keywords": "proximal,optimisation,pytorch,proximal operators",
"author": "jameschapman",
"author_email": "james.chapman.19@ucl.ac.uk",
"download_url": "https://files.pythonhosted.org/packages/a0/69/a7dc9898a1e41525032820cb7f9cd3ffac122e3fba86b05016f083cea8af/proxtorch-0.0.9.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n<img src=\"docs/source/proxtorch-logo.jpg\" alt=\"ProxTorch Logo\" width=\"200\"/>\n\n# ProxTorch\n\n**Unleashing Proximal Gradient Descent on PyTorch** \ud83d\ude80\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5748062.svg)](https://doi.org/10.5281/zenodo.4382739)\n[![codecov](https://codecov.io/gh/jameschapman19/ProxTorch/graph/badge.svg?token=909RDXcEZK)](https://codecov.io/gh/jameschapman19/ProxTorch)\n[![version](https://img.shields.io/pypi/v/ProxTorch)](https://pypi.org/project/ProxTorch/)\n[![downloads](https://img.shields.io/pypi/dm/ProxTorch)](https://pypi.org/project/ProxTorch/)\n\n</div>\n\n\ud83d\udd0d **What is ProxTorch?** \nDive into a rich realm of proximal operators and constraints with `ProxTorch`, a state-of-the-art Python library crafted\non PyTorch. Whether it's optimization challenges or the complexities of machine learning, `ProxTorch` is designed for\nspeed, efficiency, and seamless GPU integration.\n\n## \u2728 **Features**\n\n- **\ud83d\ude80 GPU-Boosted**: Experience lightning-fast computations with extensive CUDA support.\n- **\ud83d\udd25 PyTorch Synergy**: Naturally integrates with all your PyTorch endeavours.\n- **\ud83d\udcda Expansive Library**: From elemental norms (`L0`, `L1`, `L2`, `L\u221e`) to advanced regularizations like Total\n Variation and Fused Lasso.\n- **\ud83e\udd1d User-Friendly**: Jump right in! Intuitive design means minimal disruptions to your existing projects.\n\n## \ud83d\udee0 **Installation**\n\nGetting started with `ProxTorch` is a breeze. Install from PyPI with:\n\n```bash\npip install proxtorch\n```\n\nOr install from source with:\n\n```bash\ngit clone\ncd ProxTorch\npip install -e .\n```\n\n\n## \ud83d\ude80 **Quick Start**\n\nDive in with this straightforward example:\n\n```python\nimport torch\nfrom proxtorch.operators import L1\n\n# Define a sample tensor\nx = torch.tensor([0.5, -1.2, 0.3, -0.4, 0.7])\n\n# Initialize the L1 proximal operator\nl1_prox = L1(sigma=0.1)\n\n# Compute the regularization component value\nreg_value = l1_prox(x)\nprint(\"Regularization Value:\", reg_value)\n\n# Apply the proximal operator\nresult = l1_prox.prox(x)\nprint(\"Prox Result:\", result)\n```\n\n## \ud83d\udcdc **Diverse Proximal Operators**\n\n### **Regularizers**\n\n- **L1**, **L2 (Ridge)**, **ElasticNet**, **GroupLasso**, **TV** (includes TV_2D, TV_3D, TVL1_2D, TVL1_3D), **Frobenius\n **\n- **Norms**: TraceNorm, NuclearNorm\n- **FusedLasso**, **Huber**\n\n### **Constraints**\n\n- **L0Ball**, **L1Ball**, **L2Ball**, **L\u221eBall (Infinity Norm)**, **Frobenius**, **TraceNorm**, **Box**\n\n## \ud83d\udcd6 **Documentation**\n\nExplore the comprehensive documentation on [Read the Docs](https://proxtorch.readthedocs.io/en/latest/).\n\n## \ud83d\ude4c **Credits**\n\n`ProxTorch` stands on the shoulders of giants:\n\n- [pyproximal](https://github.com/PyLops/pyproximal)\n- [ProxGradPyTorch](https://github.com/KentonMurray/ProxGradPytorch)\n- [nilearn](https://github.com/nilearn/nilearn/blob/321494420f95c7a5e2172108400194b37a02e628/nilearn/decoding/proximal_operators.py)\n\nWe're thrilled to introduce `ProxTorch` as an exciting addition to the PyTorch ecosystem. We're confident you'll love\nit!\n\n## \ud83e\udd1d **Contribute to the ProxTorch Revolution**\n\nGot ideas? Join our vibrant community and make `ProxTorch` even better!\n\n## \ud83d\udcdc **License**\n\n`ProxTorch` is proudly released under the [MIT License](LICENSE).\n\n```",
"bugtrack_url": null,
"license": "MIT",
"summary": "ProxTorch is a PyTorch library for proximal operators.",
"version": "0.0.9",
"project_urls": {
"Homepage": "https://github.com/jameschapman19/proxtorch"
},
"split_keywords": [
"proximal",
"optimisation",
"pytorch",
"proximal operators"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8763ae716e3918f44a017dcc7b3231d473615fc84d3aa3fd10450047f951c9ad",
"md5": "08b17802936a77da9eb01c88854fdf36",
"sha256": "bc36b23add389ae38658223db52894e4969239356324b335a7df5a7aaf0086eb"
},
"downloads": -1,
"filename": "proxtorch-0.0.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "08b17802936a77da9eb01c88854fdf36",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0.0",
"size": 21835,
"upload_time": "2023-09-05T20:51:10",
"upload_time_iso_8601": "2023-09-05T20:51:10.340349Z",
"url": "https://files.pythonhosted.org/packages/87/63/ae716e3918f44a017dcc7b3231d473615fc84d3aa3fd10450047f951c9ad/proxtorch-0.0.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a069a7dc9898a1e41525032820cb7f9cd3ffac122e3fba86b05016f083cea8af",
"md5": "0b1a5ae9be975898e2349ee543988ea6",
"sha256": "d26b45f35d14367d7b41394ce1b4567441bd00c026c2532aa74696156dd2c2a6"
},
"downloads": -1,
"filename": "proxtorch-0.0.9.tar.gz",
"has_sig": false,
"md5_digest": "0b1a5ae9be975898e2349ee543988ea6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0.0",
"size": 12503,
"upload_time": "2023-09-05T20:51:11",
"upload_time_iso_8601": "2023-09-05T20:51:11.880020Z",
"url": "https://files.pythonhosted.org/packages/a0/69/a7dc9898a1e41525032820cb7f9cd3ffac122e3fba86b05016f083cea8af/proxtorch-0.0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-05 20:51:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jameschapman19",
"github_project": "proxtorch",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "proxtorch"
}