{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering :: Artificial Intelligence" ], "description": "

\n \n

\n\n# NNWeaver #\n\n[![Coverage Status](https://coveralls.io/repos/github/gvinciguerra/nnweaver/badge.svg?branch=master)](https://coveralls.io/github/gvinciguerra/nnweaver?branch=master)\n[![Build Status](https://travis-ci.org/gvinciguerra/nnweaver.svg?branch=master)](https://travis-ci.org/gvinciguerra/nnweaver)\n\nNNWeaver is a *tiny* Python library to create and train feedforward neural networks. We developed this library as a project for a Machine Learning course.\n\nSome of its features are:\n\n 1. Simple API, easy to learn.\n 2. Validation functions included.\n 3. Lightweight and with few dependencies.\n 4. Live loss/epoch curve display.\n\n## Installation ##\n\nYou can install NNWeaver from the GitHub source with the following commands:\n\n git clone https://github.com/gvinciguerra/nnweaver.git\n cd nnweaver\n python3 setup.py install\n\nYou can also run the test suite with `python3 setup.py test`.\n\n## Getting started ##\n\n### Specify a Neural Network Topology ###\n\nYou can create a feedforward neural network specifying the number of inputs as the argument of [`NN`](https://gvinciguerra.github.io/nnweaver/nnweaver.html#nnweaver.nn.NN), and the number of outputs by adding a [`Layer`](https://gvinciguerra.github.io/nnweaver/nnweaver.html#nnweaver.nn.Layer):\n\n from nnweaver import *\n nn = NN(3)\n nn.add_layer(Layer(5, Linear))\n\nYou can always add more layers, specify an activation function and a weights initializer, as the following lines of code show:\n\n nn.add_layer(Layer(7, Sigmoid))\n nn.add_layer(Layer(6, Rectifier, uniform(0, 0.05)))\n nn.add_layer(Layer(42, TanH, glorot_uniform()))\n\nSee [`activations`](https://gvinciguerra.github.io/nnweaver/nnweaver.html#module-nnweaver.activations) for the list of available activation functions.\n\n### Train the Neural Network ###\n\nNow, choose a [`Loss`](https://gvinciguerra.github.io/nnweaver/nnweaver.html#nnweaver.losses.Loss) function, pass it to an [`Optimizer`](https://gvinciguerra.github.io/nnweaver/nnweaver.html#nnweaver.optimizers.Optimizer) (like the stochastic gradient descent) and start the training:\n\n sgd = SGD(MSE)\n sgd.train(nn, x, y, learning_rate=0.3)\n\nThere are other arguments to pass to the [`SGD.train()`](https://gvinciguerra.github.io/nnweaver/nnweaver.html#nnweaver.optimizers.SGD.train) method, for example:\n\n sgd.train(nn, x_train, y_train,\n learning_rate_time_based(0.25, 0.001),\n batch_size=10, epochs=100, momentum=0.85)\n\nAlso, you may want to control the model complexity. [`SGD.train()`](https://gvinciguerra.github.io/nnweaver/nnweaver.html#nnweaver.optimizers.SGD.train) has a `regularizer` argument, that accepts an instance of the [`L1L2Regularizer`](https://gvinciguerra.github.io/nnweaver/nnweaver.html#nnweaver.regularizers.L1L2Regularizer) class.\n\n### A very, very simple example ###\n\n\n\n## Documentation ##\n\nFor more information, tutorials, and API reference, please visit [NNweaver's online documentation](https://gvinciguerra.github.io/nnweaver/index.html) or build your own offline copy executing `python3 setup.py docs`.\n\n## License ##\n\nThis project is licensed under the terms of the MIT License.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gvinciguerra/nnweaver", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "nnweaver", "package_url": "https://pypi.org/project/nnweaver/", "platform": "", "project_url": "https://pypi.org/project/nnweaver/", "project_urls": { "Homepage": "https://github.com/gvinciguerra/nnweaver" }, "release_url": "https://pypi.org/project/nnweaver/0.2/", "requires_dist": [ "numpy (>=1.14.0)", "scipy (>=1.0.0)", "tqdm (>=4.19.5)", "matplotlib (>=2.1.2)" ], "requires_python": ">=3.5", "summary": "A tiny Python library to create and train feedforward neural networks", "version": "0.2" }, "last_serial": 4188000, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "7dbb7ec389a517cda09de238e4d09cf3", "sha256": "92b734d8aa6ec921540c0d2625614e2bb3d78caf443a3342b12fffc74ff2ca2d" }, "downloads": -1, "filename": "nnweaver-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7dbb7ec389a517cda09de238e4d09cf3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16019, "upload_time": "2018-02-04T08:44:41", "url": "https://files.pythonhosted.org/packages/e9/ae/84a7463127c309d12ec3c3a979a7bab506df59a965dec4e4f241d9bd6bef/nnweaver-0.1-py3-none-any.whl" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "b8b1c7559d667b055dc1ef7fec0ecf52", "sha256": "8ac0070cb66e30f3e7798be15897c82685d93b533ea4f46ea957f73afe6c8098" }, "downloads": -1, "filename": "nnweaver-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b8b1c7559d667b055dc1ef7fec0ecf52", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 18517, "upload_time": "2018-08-20T11:23:06", "url": "https://files.pythonhosted.org/packages/5f/fe/8753ebabfc20ac862ffc6089569516c86cb5f8c3fc90a351ff89ad02c368/nnweaver-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c6ada2991e0f6c89634f6487e34ae3c3", "sha256": "770ae4efbd369731e10aaa0589e1d922757de37aa180c9d11a53914a2a7c7f5c" }, "downloads": -1, "filename": "nnweaver-0.2.tar.gz", "has_sig": false, "md5_digest": "c6ada2991e0f6c89634f6487e34ae3c3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 15515, "upload_time": "2018-08-20T11:23:10", "url": "https://files.pythonhosted.org/packages/7c/11/446600dc15f2f73923dad17da4d91460e4d1b8cfb095f645a89478edfacc/nnweaver-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b8b1c7559d667b055dc1ef7fec0ecf52", "sha256": "8ac0070cb66e30f3e7798be15897c82685d93b533ea4f46ea957f73afe6c8098" }, "downloads": -1, "filename": "nnweaver-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b8b1c7559d667b055dc1ef7fec0ecf52", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 18517, "upload_time": "2018-08-20T11:23:06", "url": "https://files.pythonhosted.org/packages/5f/fe/8753ebabfc20ac862ffc6089569516c86cb5f8c3fc90a351ff89ad02c368/nnweaver-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c6ada2991e0f6c89634f6487e34ae3c3", "sha256": "770ae4efbd369731e10aaa0589e1d922757de37aa180c9d11a53914a2a7c7f5c" }, "downloads": -1, "filename": "nnweaver-0.2.tar.gz", "has_sig": false, "md5_digest": "c6ada2991e0f6c89634f6487e34ae3c3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 15515, "upload_time": "2018-08-20T11:23:10", "url": "https://files.pythonhosted.org/packages/7c/11/446600dc15f2f73923dad17da4d91460e4d1b8cfb095f645a89478edfacc/nnweaver-0.2.tar.gz" } ] }