puretorch


Namepuretorch JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/Dristro/PureTorch
SummaryCustom implementation of a Neural Network library using numpy. Now supporting autograd.
upload_time2025-08-17 19:12:26
maintainerNone
docs_urlNone
authorDhruv
requires_python>=3.11
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PureTorch

**PureTorch** is a NumPy-based implementation of PyTorch. It aims to replicate the functionality and user experience of PyTorch while offering a transparent and lightweight codebase for educational and experimental purposes.

---

# Table of Contents
| Section              | Description                              |
|----------------------|------------------------------------------|
| [Version](#version-info) | Current version and features           |
| [Purpose](#purpose)      | The what and why of this repository    |
| [Structure](#structure)  | File structure of various modules      |
| [Upcoming Features](#upcoming-features) | Features under development           |
| [Setup](#setup)          | Instructions for local setup           |
| [Report Bugs](#report-bugs) | How to report issues or contribute    |


---

# Version Info

**Current Version**: **1.1.0+dev**
### Migration Guide
If you're upgrading from `v0.x.x` to `v1.x.x-dev`, please refer to the [Migration Guide](MIGRATIONGUIDE.md) for detailed instructions on updating your codebase.

The guide covers:
- Breaking changes in the API.
- Updated module structures.
- Examples of how to transition your code.

Click [here](MIGRATIONGUIDE.md) to view the Migration Guide.
<br></br>

### New Features
1. **`puretorch.Tensor`**:
   - autograd.tensor wrapper, tracks gradients for efficient back-propagation.
   - back-propagation is easier and more convenient.
2. **`puretorch.nn`**:
   - neural network modules like: `linear`, `sequential`, more.
3. **puretorch.optim**:
   - optimizers like: `SGD`, other (will add more soon).
4. **autograd**:
   - autograd is now supported, allowing users to build custom functions and give full control over gradnients.
<br></br>

### Deprecations
1. The **puretorch.layers.x** system is replaced with a simpler, PyTorch-like API.
2. Temporarily removed activations, losses, and optimizers. These will return with updated functionality, supporting Tensors.
<br></br>

> *Runs on CPU only. Might add GPU support later.*

---

# Purpose
Raw implementation of PyTorch-like library using NumPy.
The structure and essence of torch remains the same, but its  implemented using NumPy.

---

# Structure
<u><b>New file structure</b></u>:
- puretorch
    - nn
        - linear
        - Perceptron (will be deprecated in v1.1.0)
        - sequential
    - optim
      - optimizer
      - sgd
    - tensor (autograd.tensor, modified for better nn compatibility)
- autograd
  - context
  - engine (not in use now. Abstractions of tensor-ops will be added here, along with higher level tensor logic)
  - function
  - ops
  - tensor

Will be adding other layers, activations, losses and optimizers.

---

# Upcoming features
These are the features that im working on, and will soon be a part of PureTorch.
1. More optimizers (like sgd w/ momentum, adam, etc)
2. Loss functions
3. Model summary (like torchinfo.summary())

---

# Setup
> **Note**:
this for setting-up the "dev" branch locally.\
> **For stable installation**: go to the "main" branch's setup guide

### Prerequisites
- Python 3.8 or higher
- Git installed on your system


### Installation Steps
1. **Install the development branch:**
```bash
pip install PureTorch
```
2. **Verify installation in Python**
```Python
import puretorch
print(puretorch.__version__)
```
3. **Verify installation in the terminal**
```bash
python3 -c "import puretorch; print(puretorch.__version__)"
```

If the version indicated is: **1.1.0**, then the package was installed correctly.\
If not, try reinstalling the package (or) check if you installed the stable (vs) development package.

---

# Report Bugs
If you encounter issues or have suggestions, please open an issue via the [GitHub Issues tab](https://github.com/Dristro/PureTorch/issues). 

For those interested in contributing:
- Fork this repository.
- Make your changes.
- Open a pull request with a detailed description of your changes.

*Test cases will be added soon to help verify contributions and new features.*

---

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Dristro/PureTorch",
    "name": "puretorch",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": "Dhruv",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/d9/a9/4033871b4ca1cb7d8af740200c97365cf96a8eca230f4aa185fee86a489b/puretorch-1.1.1.tar.gz",
    "platform": null,
    "description": "# PureTorch\n\n**PureTorch** is a NumPy-based implementation of PyTorch. It aims to replicate the functionality and user experience of PyTorch while offering a transparent and lightweight codebase for educational and experimental purposes.\n\n---\n\n# Table of Contents\n| Section              | Description                              |\n|----------------------|------------------------------------------|\n| [Version](#version-info) | Current version and features           |\n| [Purpose](#purpose)      | The what and why of this repository    |\n| [Structure](#structure)  | File structure of various modules      |\n| [Upcoming Features](#upcoming-features) | Features under development           |\n| [Setup](#setup)          | Instructions for local setup           |\n| [Report Bugs](#report-bugs) | How to report issues or contribute    |\n\n\n---\n\n# Version Info\n\n**Current Version**: **1.1.0+dev**\n### Migration Guide\nIf you're upgrading from `v0.x.x` to `v1.x.x-dev`, please refer to the [Migration Guide](MIGRATIONGUIDE.md) for detailed instructions on updating your codebase.\n\nThe guide covers:\n- Breaking changes in the API.\n- Updated module structures.\n- Examples of how to transition your code.\n\nClick [here](MIGRATIONGUIDE.md) to view the Migration Guide.\n<br></br>\n\n### New Features\n1. **`puretorch.Tensor`**:\n   - autograd.tensor wrapper, tracks gradients for efficient back-propagation.\n   - back-propagation is easier and more convenient.\n2. **`puretorch.nn`**:\n   - neural network modules like: `linear`, `sequential`, more.\n3. **puretorch.optim**:\n   - optimizers like: `SGD`, other (will add more soon).\n4. **autograd**:\n   - autograd is now supported, allowing users to build custom functions and give full control over gradnients.\n<br></br>\n\n### Deprecations\n1. The **puretorch.layers.x** system is replaced with a simpler, PyTorch-like API.\n2. Temporarily removed activations, losses, and optimizers. These will return with updated functionality, supporting Tensors.\n<br></br>\n\n> *Runs on CPU only. Might add GPU support later.*\n\n---\n\n# Purpose\nRaw implementation of PyTorch-like library using NumPy.\nThe structure and essence of torch remains the same, but its  implemented using NumPy.\n\n---\n\n# Structure\n<u><b>New file structure</b></u>:\n- puretorch\n    - nn\n        - linear\n        - Perceptron (will be deprecated in v1.1.0)\n        - sequential\n    - optim\n      - optimizer\n      - sgd\n    - tensor (autograd.tensor, modified for better nn compatibility)\n- autograd\n  - context\n  - engine (not in use now. Abstractions of tensor-ops will be added here, along with higher level tensor logic)\n  - function\n  - ops\n  - tensor\n\nWill be adding other layers, activations, losses and optimizers.\n\n---\n\n# Upcoming features\nThese are the features that im working on, and will soon be a part of PureTorch.\n1. More optimizers (like sgd w/ momentum, adam, etc)\n2. Loss functions\n3. Model summary (like torchinfo.summary())\n\n---\n\n# Setup\n> **Note**:\nthis for setting-up the \"dev\" branch locally.\\\n> **For stable installation**: go to the \"main\" branch's setup guide\n\n### Prerequisites\n- Python 3.8 or higher\n- Git installed on your system\n\n\n### Installation Steps\n1. **Install the development branch:**\n```bash\npip install PureTorch\n```\n2. **Verify installation in Python**\n```Python\nimport puretorch\nprint(puretorch.__version__)\n```\n3. **Verify installation in the terminal**\n```bash\npython3 -c \"import puretorch; print(puretorch.__version__)\"\n```\n\nIf the version indicated is: **1.1.0**, then the package was installed correctly.\\\nIf not, try reinstalling the package (or) check if you installed the stable (vs) development package.\n\n---\n\n# Report Bugs\nIf you encounter issues or have suggestions, please open an issue via the [GitHub Issues tab](https://github.com/Dristro/PureTorch/issues). \n\nFor those interested in contributing:\n- Fork this repository.\n- Make your changes.\n- Open a pull request with a detailed description of your changes.\n\n*Test cases will be added soon to help verify contributions and new features.*\n\n---\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Custom implementation of a Neural Network library using numpy. Now supporting autograd.",
    "version": "1.1.1",
    "project_urls": {
        "Homepage": "https://github.com/Dristro/PureTorch"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2e79faafa15eccb2b5c7b5ec6bd1a5f5a61cfe89d7541f3383dd61fe64249aa3",
                "md5": "0b93073bdf07017c4aa898a469edf564",
                "sha256": "62ab08a647a7d97e49c166d704a06622fa13cc15beb579df19a81e9353c5d995"
            },
            "downloads": -1,
            "filename": "puretorch-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0b93073bdf07017c4aa898a469edf564",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 32360,
            "upload_time": "2025-08-17T19:12:25",
            "upload_time_iso_8601": "2025-08-17T19:12:25.326429Z",
            "url": "https://files.pythonhosted.org/packages/2e/79/faafa15eccb2b5c7b5ec6bd1a5f5a61cfe89d7541f3383dd61fe64249aa3/puretorch-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d9a94033871b4ca1cb7d8af740200c97365cf96a8eca230f4aa185fee86a489b",
                "md5": "23573e7fb8e3c29a9dd8cbad3feb33ce",
                "sha256": "feeb487dd26c96029344f96cafd21326625c2f33bcb46ac054b9891a5a831501"
            },
            "downloads": -1,
            "filename": "puretorch-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "23573e7fb8e3c29a9dd8cbad3feb33ce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 26853,
            "upload_time": "2025-08-17T19:12:26",
            "upload_time_iso_8601": "2025-08-17T19:12:26.692930Z",
            "url": "https://files.pythonhosted.org/packages/d9/a9/4033871b4ca1cb7d8af740200c97365cf96a8eca230f4aa185fee86a489b/puretorch-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-17 19:12:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Dristro",
    "github_project": "PureTorch",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "puretorch"
}
        
Elapsed time: 0.65509s