netwk


Namenetwk JSON
Version 2.12.5 PyPI version JSON
download
home_pagehttps://github.com/flowa-ai/netwk
SummaryCreate fast, optimized, and easy-to-use neural networks.
upload_time2023-12-17 17:08:11
maintainer
docs_urlNone
authorflowa.ai
requires_python>=3.6
license
keywords network machine learning ai neural network
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center"><a href="[https://i.ibb.co/cTyQysp/netwk-back-modified.png](https://i.ibb.co/cTyQysp/netwk-back-modified.png)"><img src="https://i.ibb.co/cTyQysp/netwk-back-modified.png" alt="flowa" border="0" width="430"></a></div>

# [netkw - Neural Network Toolkit](https://pypi.org/project/netwk)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/flowa-ai/netwk/blob/master/LICENSE)
[![Python Versions](https://img.shields.io/badge/python-3.7%20|%203.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12%20-blue)](https://www.python.org/downloads/)

```
netwk: (V2.12.5)

Create fast, optimized, and easy-to-use neural networks.
```

## Installing
```shell
# Linux/macOS
python3 pip install -U netwk

# Windows
py -3 -m pip install -U netwk
```

### FastFix:
```diff
+ Made it so for hidden layers, you can have just one layer, in or not in a list/tuple.
```

# Usage
```python
import netwk as nk

nk.Seed(52) # Optional, used for testing purposes.

x = nk.Array([[0, 0], [0, 1], [1, 0], [1, 1]])
y = nk.Array([[0], [1], [1], [0]])
```
```python
network = nk.Network(
    nk.Input(2),
    (
        nk.Hidden(3, nk.Tanh), 
        nk.Hidden(2, nk.Sigmoid)
    ),
    nk.Output(1)
)
```
```python
network.train(x, y, epoch=500)
print(network.predict(x)
```
```javascript
/* Output (800ms Average):
>>> Epoch: 0, Error: 0.4984800733120248
>>> Epoch: 50, Error: 0.49632395442760113
>>> Epoch: 100, Error: 0.4781823668945816
>>> Epoch: 150, Error: 0.35665153383154413
>>> Epoch: 200, Error: 0.1874969659672475
>>> Epoch: 250, Error: 0.12789399797698137
>>> Epoch: 300, Error: 0.10069853802998781
>>> Epoch: 350, Error: 0.08495289503359527
>>> Epoch: 400, Error: 0.07452557528756484
>>> Epoch: 450, Error: 0.06702276126613768
[[0.10447174]
 [0.94106133]
 [0.94096653]
 [0.02281434]]
*/
```

# All activations:
```javascript
/*
    "Sigmoid",
    "Tanh",
    "ReLU",
    "LeakyReLU",
    "ELU",
    "Swish",
    "Gaussion",
    "Identity",
    "BinaryStep",
    "PReLU",
    "Exponential",
    "Softplus",
    "Softsign",
    "BentIdentity",
    "ArcTan",
    "SiLU",
    "Mish",
    "HardSigmoid",
    "HardTanh",
    "SoftExponential",
    "ISRU",
    "Sine",
    "Cosine",
    "SQNL",
    "SoftClipping",
    "BentIdentity2",
    "LogLog",
    "GELU",
    "Softmin",
*/
```

# Make your own!
```python
import netwk as nk

class MyModule(nk.Module):
    def __init__(self, *args, **kwargs):
        super().__init__("MyModule", *args, **kwargs)

    def forward(self, x):
        return x

    def backward(self, x, y, outputs):
        return nk.np.ones_like(x)
```

# Seeing used modules + seed.
```python
import netwk as nk

...Defining A Neural Network Here...

print(nk.modules())
```
```javascript
/* Example:
{'Input': Input(size: 2), 'Hidden': Hidden(size: 2), 'Output': Output(size: 1), 'Network': Network(
    Input Layer:
        1 Input(size: 2)

    Hidden Layers:        
        1 Hidden(size: 3)
        2 Hidden(size: 2)

    Output Layer:
        1 Output(size: 1)
)}
*/
```
```python
print(nk.seed())
# print(nk.seed(34))
```
```javascript
/* Example:
0
# 34
*/
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/flowa-ai/netwk",
    "name": "netwk",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "network,machine learning,ai,neural network",
    "author": "flowa.ai",
    "author_email": "flowa.dev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b5/68/1d390f04cc6c474c374e3a50e12e201a49cce94eaecec4fffed96b65d849/netwk-2.12.5.tar.gz",
    "platform": null,
    "description": "<div align=\"center\"><a href=\"[https://i.ibb.co/cTyQysp/netwk-back-modified.png](https://i.ibb.co/cTyQysp/netwk-back-modified.png)\"><img src=\"https://i.ibb.co/cTyQysp/netwk-back-modified.png\" alt=\"flowa\" border=\"0\" width=\"430\"></a></div>\n\n# [netkw - Neural Network Toolkit](https://pypi.org/project/netwk)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/flowa-ai/netwk/blob/master/LICENSE)\n[![Python Versions](https://img.shields.io/badge/python-3.7%20|%203.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12%20-blue)](https://www.python.org/downloads/)\n\n```\nnetwk: (V2.12.5)\n\nCreate fast, optimized, and easy-to-use neural networks.\n```\n\n## Installing\n```shell\n# Linux/macOS\npython3 pip install -U netwk\n\n# Windows\npy -3 -m pip install -U netwk\n```\n\n### FastFix:\n```diff\n+ Made it so for hidden layers, you can have just one layer, in or not in a list/tuple.\n```\n\n# Usage\n```python\nimport netwk as nk\n\nnk.Seed(52) # Optional, used for testing purposes.\n\nx = nk.Array([[0, 0], [0, 1], [1, 0], [1, 1]])\ny = nk.Array([[0], [1], [1], [0]])\n```\n```python\nnetwork = nk.Network(\n    nk.Input(2),\n    (\n        nk.Hidden(3, nk.Tanh), \n        nk.Hidden(2, nk.Sigmoid)\n    ),\n    nk.Output(1)\n)\n```\n```python\nnetwork.train(x, y, epoch=500)\nprint(network.predict(x)\n```\n```javascript\n/* Output (800ms Average):\n>>> Epoch: 0, Error: 0.4984800733120248\n>>> Epoch: 50, Error: 0.49632395442760113\n>>> Epoch: 100, Error: 0.4781823668945816\n>>> Epoch: 150, Error: 0.35665153383154413\n>>> Epoch: 200, Error: 0.1874969659672475\n>>> Epoch: 250, Error: 0.12789399797698137\n>>> Epoch: 300, Error: 0.10069853802998781\n>>> Epoch: 350, Error: 0.08495289503359527\n>>> Epoch: 400, Error: 0.07452557528756484\n>>> Epoch: 450, Error: 0.06702276126613768\n[[0.10447174]\n [0.94106133]\n [0.94096653]\n [0.02281434]]\n*/\n```\n\n# All activations:\n```javascript\n/*\n    \"Sigmoid\",\n    \"Tanh\",\n    \"ReLU\",\n    \"LeakyReLU\",\n    \"ELU\",\n    \"Swish\",\n    \"Gaussion\",\n    \"Identity\",\n    \"BinaryStep\",\n    \"PReLU\",\n    \"Exponential\",\n    \"Softplus\",\n    \"Softsign\",\n    \"BentIdentity\",\n    \"ArcTan\",\n    \"SiLU\",\n    \"Mish\",\n    \"HardSigmoid\",\n    \"HardTanh\",\n    \"SoftExponential\",\n    \"ISRU\",\n    \"Sine\",\n    \"Cosine\",\n    \"SQNL\",\n    \"SoftClipping\",\n    \"BentIdentity2\",\n    \"LogLog\",\n    \"GELU\",\n    \"Softmin\",\n*/\n```\n\n# Make your own!\n```python\nimport netwk as nk\n\nclass MyModule(nk.Module):\n    def __init__(self, *args, **kwargs):\n        super().__init__(\"MyModule\", *args, **kwargs)\n\n    def forward(self, x):\n        return x\n\n    def backward(self, x, y, outputs):\n        return nk.np.ones_like(x)\n```\n\n# Seeing used modules + seed.\n```python\nimport netwk as nk\n\n...Defining A Neural Network Here...\n\nprint(nk.modules())\n```\n```javascript\n/* Example:\n{'Input': Input(size: 2), 'Hidden': Hidden(size: 2), 'Output': Output(size: 1), 'Network': Network(\n    Input Layer:\n        1 Input(size: 2)\n\n    Hidden Layers:        \n        1 Hidden(size: 3)\n        2 Hidden(size: 2)\n\n    Output Layer:\n        1 Output(size: 1)\n)}\n*/\n```\n```python\nprint(nk.seed())\n# print(nk.seed(34))\n```\n```javascript\n/* Example:\n0\n# 34\n*/\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Create fast, optimized, and easy-to-use neural networks.",
    "version": "2.12.5",
    "project_urls": {
        "Homepage": "https://github.com/flowa-ai/netwk"
    },
    "split_keywords": [
        "network",
        "machine learning",
        "ai",
        "neural network"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "19d9c3e10977f7ca8fe5355c7207805a2ae3a29f3dacbd0f3a2f035b814a9441",
                "md5": "ce5b2400e0c6e3f31143bb228f66cfe9",
                "sha256": "2201b9cb9f632dd7754683cbcdc57a3e93a752f6117d6be21c422277489a5841"
            },
            "downloads": -1,
            "filename": "netwk-2.12.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ce5b2400e0c6e3f31143bb228f66cfe9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 7323,
            "upload_time": "2023-12-17T17:08:09",
            "upload_time_iso_8601": "2023-12-17T17:08:09.899103Z",
            "url": "https://files.pythonhosted.org/packages/19/d9/c3e10977f7ca8fe5355c7207805a2ae3a29f3dacbd0f3a2f035b814a9441/netwk-2.12.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b5681d390f04cc6c474c374e3a50e12e201a49cce94eaecec4fffed96b65d849",
                "md5": "d8810b030f05194b15668f1a1f3e6bcc",
                "sha256": "2f0e9f146d00270290f1c6859f1f82003ae6c0fcc9e0e512ee01320014ab2466"
            },
            "downloads": -1,
            "filename": "netwk-2.12.5.tar.gz",
            "has_sig": false,
            "md5_digest": "d8810b030f05194b15668f1a1f3e6bcc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 6332,
            "upload_time": "2023-12-17T17:08:11",
            "upload_time_iso_8601": "2023-12-17T17:08:11.139652Z",
            "url": "https://files.pythonhosted.org/packages/b5/68/1d390f04cc6c474c374e3a50e12e201a49cce94eaecec4fffed96b65d849/netwk-2.12.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-17 17:08:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "flowa-ai",
    "github_project": "netwk",
    "github_not_found": true,
    "lcname": "netwk"
}
        
Elapsed time: 0.15151s