flowlite


Nameflowlite JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/caaatch22/flowlite
SummaryA simple, educational deep learning framework
upload_time2024-03-20 11:26:27
maintainerNone
docs_urlNone
authorMingjie
requires_pythonNone
licenseNone
keywords deep learning auto-diff
VCS
bugtrack_url
requirements numpy typing_extensions
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# FlowLite

FlowLite is a lightweight deep learning framework designed for educational purposes, with an API similar to PyTorch. It simplifies the process of building, training, and deploying neural networks, making it ideal for beginners and educators in the field of AI.

## Installation

You can install FlowLite using pip:

```bash
pip install flowlite
```


## Quick Start
Here's a quick example of using FlowLite to create a simple neural network:
```python
import flowlite
import flowlite.nn as nn
import flowlite.optim as optim
import flowlite.functional as F

# Define a simple model
class Net(nn.Module):
    def __init__(self):
        super(Net, self).__init__()
        self.fc1 = nn.Linear(784, 128)
        self.fc2 = nn.Linear(128, 10)

    def forward(self, x):
        x = F.relu(self.fc1(x))
        x = self.fc2(x)
        return x

# Initialize the model
model = Net()

# Define a loss function and optimizer
loss_fn = nn.CrossEntropyLoss()
optimizer = optim.SGD(model.parameters(), lr=0.01)

# Dummy data for the sake of example
inputs = flowlite.randn(64, 784)  # Batch size 64, input dimension 784
labels = flowlite.randint(0, 10, (64,))  # Random labels for a batch size of 64

# Forward pass
outputs = model(inputs)
loss = loss_fn(outputs, labels)

# Backward pass and optimization
optimizer.zero_grad()
loss.backward()
optimizer.step()

print('Training step complete.')
```

## License
This project is licensed under the [Apache License (Version 2.0)](https://github.com/caaatch22/flowlite/blob/main/LICENSE).


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/caaatch22/flowlite",
    "name": "flowlite",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "deep learning, auto-diff",
    "author": "Mingjie",
    "author_email": "<mr.liumingjie@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/02/6a/9fafaf69f831297104e86c617b1f0ef72ac468f074e1e001e9582ca86e1d/flowlite-0.0.3.tar.gz",
    "platform": null,
    "description": "\n# FlowLite\n\nFlowLite is a lightweight deep learning framework designed for educational purposes, with an API similar to PyTorch. It simplifies the process of building, training, and deploying neural networks, making it ideal for beginners and educators in the field of AI.\n\n## Installation\n\nYou can install FlowLite using pip:\n\n```bash\npip install flowlite\n```\n\n\n## Quick Start\nHere's a quick example of using FlowLite to create a simple neural network:\n```python\nimport flowlite\nimport flowlite.nn as nn\nimport flowlite.optim as optim\nimport flowlite.functional as F\n\n# Define a simple model\nclass Net(nn.Module):\n    def __init__(self):\n        super(Net, self).__init__()\n        self.fc1 = nn.Linear(784, 128)\n        self.fc2 = nn.Linear(128, 10)\n\n    def forward(self, x):\n        x = F.relu(self.fc1(x))\n        x = self.fc2(x)\n        return x\n\n# Initialize the model\nmodel = Net()\n\n# Define a loss function and optimizer\nloss_fn = nn.CrossEntropyLoss()\noptimizer = optim.SGD(model.parameters(), lr=0.01)\n\n# Dummy data for the sake of example\ninputs = flowlite.randn(64, 784)  # Batch size 64, input dimension 784\nlabels = flowlite.randint(0, 10, (64,))  # Random labels for a batch size of 64\n\n# Forward pass\noutputs = model(inputs)\nloss = loss_fn(outputs, labels)\n\n# Backward pass and optimization\noptimizer.zero_grad()\nloss.backward()\noptimizer.step()\n\nprint('Training step complete.')\n```\n\n## License\nThis project is licensed under the [Apache License (Version 2.0)](https://github.com/caaatch22/flowlite/blob/main/LICENSE).\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A simple, educational deep learning framework",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/caaatch22/flowlite"
    },
    "split_keywords": [
        "deep learning",
        " auto-diff"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f47050d443a9eac0aa654b0234abf3746397a0cf01a33d89848ff0e314d63006",
                "md5": "c3b444b81f65c17df79419b5d591b989",
                "sha256": "c315f005f36ea9956c8be3422e7afd17270bb59b63330368e7c30488e8c81c7d"
            },
            "downloads": -1,
            "filename": "flowlite-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c3b444b81f65c17df79419b5d591b989",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 20017,
            "upload_time": "2024-03-20T11:26:25",
            "upload_time_iso_8601": "2024-03-20T11:26:25.628208Z",
            "url": "https://files.pythonhosted.org/packages/f4/70/50d443a9eac0aa654b0234abf3746397a0cf01a33d89848ff0e314d63006/flowlite-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "026a9fafaf69f831297104e86c617b1f0ef72ac468f074e1e001e9582ca86e1d",
                "md5": "b48d269e5496957765f022703c6b0b6b",
                "sha256": "0542cc1001d8aad87646b7d6d6a5af4241925b4bd355c1a699527c2672bc6c58"
            },
            "downloads": -1,
            "filename": "flowlite-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "b48d269e5496957765f022703c6b0b6b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17310,
            "upload_time": "2024-03-20T11:26:27",
            "upload_time_iso_8601": "2024-03-20T11:26:27.661154Z",
            "url": "https://files.pythonhosted.org/packages/02/6a/9fafaf69f831297104e86c617b1f0ef72ac468f074e1e001e9582ca86e1d/flowlite-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-20 11:26:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "caaatch22",
    "github_project": "flowlite",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "typing_extensions",
            "specs": []
        }
    ],
    "lcname": "flowlite"
}
        
Elapsed time: 0.20776s