{"id":23867335,"url":"https://github.com/deependujha/deeptensor","last_synced_at":"2026-02-13T22:06:50.073Z","repository":{"id":270730181,"uuid":"911281213","full_name":"deependujha/DeepTensor","owner":"deependujha","description":"DeepTensor: A minimal PyTorch-like deep learning library focused on custom autograd and efficient tensor operations.","archived":false,"fork":false,"pushed_at":"2025-01-26T08:43:30.000Z","size":1412,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T12:13:51.644Z","etag":null,"topics":["autograd-engine","computer-vision","ddp","deep-learning","distributed-systems","gpt","gpt-2","neural-networks","pytorch","transformer"],"latest_commit_sha":null,"homepage":"https://deependujha.github.io/DeepTensor/","language":"C++","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/deependujha.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,"zenodo":null}},"created_at":"2025-01-02T16:46:28.000Z","updated_at":"2025-02-16T14:55:41.000Z","dependencies_parsed_at":"2025-01-02T18:24:51.904Z","dependency_job_id":"54f8d359-d1c1-4ae2-b828-cab23d986c06","html_url":"https://github.com/deependujha/DeepTensor","commit_stats":null,"previous_names":["deependujha/deeptensor"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/deependujha/DeepTensor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deependujha%2FDeepTensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deependujha%2FDeepTensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deependujha%2FDeepTensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deependujha%2FDeepTensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deependujha","download_url":"https://codeload.github.com/deependujha/DeepTensor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deependujha%2FDeepTensor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261649858,"owners_count":23189755,"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":["autograd-engine","computer-vision","ddp","deep-learning","distributed-systems","gpt","gpt-2","neural-networks","pytorch","transformer"],"created_at":"2025-01-03T10:18:39.645Z","updated_at":"2026-02-13T22:06:45.044Z","avatar_url":"https://github.com/deependujha.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepTensor 🔥\n\n\u003cdiv align=\"center\"\u003e\n\n\u003ca href=\"https://pypi.org/project/deeptensor/\"\u003e\u003cimg src=\"https://img.shields.io/badge/pypi-3775A9?style=for-the-badge\u0026logo=pypi\u0026logoColor=white\"/\u003e\u003c/a\u003e \u003ca href=\"https://deependujha.github.io/DeepTensor/\"\u003e\u003cimg src=\"https://img.shields.io/badge/mkdocs-documentation\"/\u003e\u003c/a\u003e\n![PyPI](https://img.shields.io/pypi/v/deeptensor)\n![Downloads](https://img.shields.io/pypi/dm/deeptensor)\n![License](https://img.shields.io/github/license/deependujha/DeepTensor)\n\u003ca target=\"_blank\" href=\"https://colab.research.google.com/github/deependujha/DeepTensor/blob/main/demo/roboflow-demo.ipynb\"\u003e\n  \u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/\u003e\n\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n![mexican cat dance](https://www.deependujha.xyz/deeptensor-assets/mexican-cat-dance.gif)\n\n\u003c/div\u003e\n\n- **`DeepTensor`**: A minimal PyTorch-like **deep learning library** focused on custom autograd and efficient tensor operations.\n\n---\n\n## **Features at a Glance** 🚀\n\n- **Automatic gradient computation** with a custom autograd engine.\n- **Weight initialization schemes**:\n  - `Xavier/Glorot` and `He` initialization in both `uniform` and `normal` variants.\n- **Activation functions**:\n  - `ReLU`, `GeLU`, `Sigmoid`, `Tanh`, `SoftMax`, `LeakyReLU`, and more.\n- **Built-in loss functions**:\n  - `Mean Squared Error (MSE)`, `Cross Entropy`, and `Binary Cross Entropy`.\n- **Optimizers**:\n  - `SGD`, `Momentum`, `AdaGrad`, `RMSprop`, and `Adam`.\n\n---\n\n### **Why DeepTensor?**\n\nDeepTensor offers a hands-on implementation of deep learning fundamentals with a focus on **customizability** and **learning the internals** of deep learning frameworks like PyTorch.\n\n---\n\n## Installation\n\n```bash\npip install deeptensor\n```\n\n---\n\n## Setup the project for development\n\n```bash\ngit clone --recurse-submodules -j8 git@github.com:deependujha/DeepTensor.git\ncd DeepTensor\n\n# run ctests\nmake ctest\n\n# install python package in editable mode\npip install -e .\n\n# run pytest\nmake test\n```\n\n---\n\n## Checkout Demo\n\n- [play with latest demo](./demo/roboflow-demo.ipynb)\n\n![demo](https://www.deependujha.xyz/deeptensor-assets/deeptensor-confusion-matrix.png)\n\n---\n\n## Check Docs\n\n- [visit docs](https://deependujha.github.io/DeepTensor)\n\n![loss curve](https://www.deependujha.xyz/deeptensor-assets/loss-curve.png)\n\n---\n\n## Basic Usage\n\n```python\nfrom deeptensor import (\n    # model\n    Model,\n\n    # Layers\n    Conv2D,\n    MaxPooling2D,\n    Flatten,\n    LinearLayer,\n\n    # activation layers\n    GeLu,\n    LeakyReLu,\n    ReLu,\n    Sigmoid,\n    SoftMax,\n    Tanh,\n\n    # core objects\n    Tensor,\n    Value,\n\n    # optimizers\n    SGD,\n    Momentum,\n    AdaGrad,\n    RMSprop,\n    Adam,\n\n    # losses\n    mean_squared_error,\n    cross_entropy,\n    binary_cross_entropy,\n)\n\nmodel = Model(\n    [\n        LinearLayer(2, 16),\n        ReLu(),\n        LinearLayer(16, 16),\n        LeakyReLu(0.1),\n        LinearLayer(16, 1),\n        Sigmoid(),\n    ],\n    False,  # using_cuda\n)\n\nopt = Adam(model, 0.01) # learning rate\n\nprint(model)\n\ntensor_input = Tensor([2])\ntensor_input.set(0, Value(2.4))\ntensor_input.set(1, Value(5.2))\n\nout = model(tensor_input)\n\nloss = mean_squared_error(out, YOUR_EXPECTED_OUTPUT)\n\n# backprop\nloss.backward()\nopt.step()\nopt.zero_grad()\n```\n\n---\n\n## Features expected to be added\n\n- Save \u0026 Load model\n- Train a character-level transformer model\n- Add support for DDP\n- Add support for CUDA execution ⭐️\n\n---\n\n## Open to Opportunities 🎅🏻🎁\n\nI am actively seeking new opportunities to contribute to impactful projects in the deep learning and AI space.\n\nIf you are interested in collaborating or have a position that aligns with my expertise, feel free to reach out!\n\nYou can connect with me on [GitHub](https://github.com/deependujha), [X (formerly twitter)](https://x.com/deependu__), or email me: `deependujha21@gmail.com`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeependujha%2Fdeeptensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeependujha%2Fdeeptensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeependujha%2Fdeeptensor/lists"}