{ "info": { "author": "Fr\u00e9d\u00e9rik Paradis", "author_email": "fredy_14@live.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "![Poutyne Logo](https://github.com/GRAAL-Research/poutyne/blob/master/docs/source/_static/logos/poutyne-dark.png)\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)\n[![Build Status](https://travis-ci.org/GRAAL-Research/poutyne.svg?branch=master)](https://travis-ci.org/GRAAL-Research/poutyne)\n\n## Here is Poutyne.\n\nPoutyne is a Keras-like framework for [PyTorch](https://pytorch.org/) and handles much of the boilerplating code needed to train neural networks.\n\nUse Poutyne to:\n- Train models easily.\n- Use callbacks to save your best model, perform early stopping and much more.\n\nRead the documentation at [Poutyne.org](https://poutyne.org).\n\nPoutyne is compatible with the __latest version of PyTorch__ and __Python >= 3.5__.\n\n### Cite\n```\n@misc{poutyne,\n author = {Paradis, Fr{\\'e}d{\\'e}rik},\n title = {{Poutyne: A Keras-like framework for PyTorch}},\n year = {2018},\n note = {\\url{https://poutyne.org}}\n}\n```\n\n\n------------------\n\n\n## Getting started: few seconds to Poutyne\n\nThe core data structure of Poutyne is a [Model](poutyne/framework/model.py), a way to train your own [PyTorch](https://pytorch.org/docs/master/nn.html) neural networks.\n\nHow Poutyne works is that you create your [PyTorch](https://pytorch.org/docs/master/nn.html) module (neural network) as usual but when comes the time to train it you feed it into the Poutyne Model, which handles all the steps, stats and callbacks, similar to what [Keras](https://keras.io) does.\n\nHere is a simple example:\n\n```python\n# Import the Poutyne Model and define a toy dataset\nfrom poutyne.framework import Model\nimport torch\nimport numpy as np\n\nnum_features = 20\nnum_classes = 5\n\nnum_train_samples = 800\ntrain_x = np.random.randn(num_train_samples, num_features).astype('float32')\ntrain_y = np.random.randint(num_classes, size=num_train_samples).astype('int64')\n\nnum_valid_samples = 200\nvalid_x = np.random.randn(num_valid_samples, num_features).astype('float32')\nvalid_y = np.random.randint(num_classes, size=num_valid_samples).astype('int64')\n\nnum_test_samples = 200\ntest_x = np.random.randn(num_test_samples, num_features).astype('float32')\ntest_y = np.random.randint(num_classes, size=num_test_samples).astype('int64')\n```\n\nCreate yourself a [PyTorch](https://pytorch.org/docs/master/nn.html) network:\n\n```python\npytorch_module = torch.nn.Linear(num_features, num_classes)\n```\n\nYou can now use Poutyne's model to train your network easily:\n\n```python\nmodel = Model(pytorch_module, 'sgd', 'cross_entropy',\n batch_metrics=['accuracy'], epoch_metrics=['f1'])\nmodel.fit(\n train_x, train_y,\n validation_data=(valid_x, valid_y),\n epochs=5,\n batch_size=32\n)\n```\n\nThis is really similar to the [model.compile](https://keras.io/models/model/#compile) and [model.fit](https://keras.io/models/model/#fit) functions as in [Keras](https://keras.io).\n\nYou can evaluate the performances of your network using the ``evaluate`` method of Poutyne's model:\n\n```python\nloss_and_metrics = model.evaluate(test_x, test_y)\n```\n\nOr only predict on new data:\n\n```python\npredictions = model.predict(test_x)\n```\n\nAs you can see, Poutyne is inspired a lot by the friendliness of [Keras](https://keras.io). See the Poutyne documentation at [Poutyne.org](https://poutyne.org) for more.\n\n\n------------------\n\n## Installation\n\nBefore installing Poutyne, you must have the latest version of [PyTorch](https://pytorch.org/) in your environment.\n\n- **Install the stable version of Poutyne:**\n\n```sh\npip install poutyne\n```\n\n- **Install the latest development version of Poutyne:**\n\n```sh\npip install -U git+https://github.com/GRAAL-Research/poutyne.git@dev\n```\n\n\n------------------\n\n## Examples\n\nLook at notebook files with full working [examples](https://github.com/GRAAL-Research/poutyne/blob/master/examples/):\n\n* [introduction_pytorch_poutyne.ipynb](https://github.com/GRAAL-Research/poutyne/blob/master/examples/introduction_pytorch_poutyne.ipynb) ([tutorial version](https://github.com/GRAAL-Research/poutyne/blob/master/tutorials/introduction_pytorch_poutyne_tutorial.ipynb)) - comparison of Poutyne with bare PyTorch and example of a Poutyne callback.\n* [transfer_learning.ipynb](https://github.com/GRAAL-Research/poutyne/blob/master/examples/transfer_learning.ipynb) - transfer learning on ResNet-18 on the [CUB-200](http://www.vision.caltech.edu/visipedia/CUB-200-2011.html) dataset.\n* [policy_cifar_example.ipynb](https://github.com/GRAAL-Research/poutyne/blob/master/examples/policy_cifar_example.ipynb) - policies API, FastAI-like learning rate policies\n* [policy_interface.ipynb](https://github.com/GRAAL-Research/poutyne/blob/master/examples/policy_interface.ipynb) - example of policies\n\n\n------------------\n\n## Contributing to Poutyne\n\nWe welcome user input, whether it is regarding bugs found in the library or feature propositions ! Make sure to have a look at our [contributing guidelines](https://github.com/GRAAL-Research/poutyne/blob/master/CONTRIBUTING.md) for more details on this matter.\n\n------------------\n\n## License\n\nPoutyne is GPLv3 licensed, as found in the [LICENSE file](https://github.com/GRAAL-Research/poutyne/blob/master/LICENSE).\n\n------------------\n\n## Why this name, Poutyne?\n\nPoutyne (or poutine in Qu\u00e9b\u00e9cois) is now the well-known dish from Quebec composed of French fries, squeaky cheese curds and brown gravy. However, in Quebec, it also has the meaning of something that is an [\"ordinary or common subject or activity\"](https://fr.wiktionary.org/wiki/poutine). Thus, Poutyne will get rid of the ordinary boilerplate code that plain [PyTorch](https://pytorch.org) training usually entails.\n\n![Poutine](https://upload.wikimedia.org/wikipedia/commons/4/4e/La_Banquise_Poutine_%28cropped%29.jpg)\n*Yuri Long from Arlington, VA, USA \\[[CC BY 2.0](https://creativecommons.org/licenses/by/2.0)\\]*\n\n------------------", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/GRAAL-Research/poutyne/archive/v0.6.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://poutyne.org", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "Poutyne", "package_url": "https://pypi.org/project/Poutyne/", "platform": "", "project_url": "https://pypi.org/project/Poutyne/", "project_urls": { "Download": "https://github.com/GRAAL-Research/poutyne/archive/v0.6.zip", "Homepage": "https://poutyne.org" }, "release_url": "https://pypi.org/project/Poutyne/0.6/", "requires_dist": null, "requires_python": ">=3", "summary": "A Keras-like framework and utilities for PyTorch.", "version": "0.6" }, "last_serial": 5912812, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "e78d8b970a321e1c65b42f8eead4739d", "sha256": "158ab6d2e1ed6e16f25d920d25e8d4f0d2a41edcdfdcf0daa20fab24548628ca" }, "downloads": -1, "filename": "Poutyne-0.5.tar.gz", "has_sig": false, "md5_digest": "e78d8b970a321e1c65b42f8eead4739d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 39630, "upload_time": "2019-03-24T20:34:36", "url": "https://files.pythonhosted.org/packages/b1/23/2ed42e463cc3dc79f7cc00220414a550573e7d4498a3cc8eab07df92a9a7/Poutyne-0.5.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "a15c6c59e4fdd0dcdbb1ea9fc9888ac0", "sha256": "507322bf3e35682618e810bb2c23f81869bc57f13c09b07c0e6ba2523c3b18dd" }, "downloads": -1, "filename": "Poutyne-0.5.1.tar.gz", "has_sig": false, "md5_digest": "a15c6c59e4fdd0dcdbb1ea9fc9888ac0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 38383, "upload_time": "2019-05-02T14:12:41", "url": "https://files.pythonhosted.org/packages/d7/6e/ba3423a97a91891504dfa1d5fc277e9d1a4b46bebe8f7408f9e5611ccbb5/Poutyne-0.5.1.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "3fbdf82cff75b8ea45629a04e38e0688", "sha256": "3d59236e881ad6086d88eae921900c918ff094d2bfa55cb1e7bb5dd868a9cd58" }, "downloads": -1, "filename": "Poutyne-0.6.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "3fbdf82cff75b8ea45629a04e38e0688", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 128584, "upload_time": "2019-09-30T19:35:26", "url": "https://files.pythonhosted.org/packages/ee/1f/e37e8f97cb60be5bbb78e17a43da789d53e770cace47d568eb7760f26893/Poutyne-0.6.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "232a7f418af09f92e8f8ec75aead4c11", "sha256": "90cdae5dc17af9adb33ac84382382a499ba5e2b4ae51546c1b8c49820f5266d6" }, "downloads": -1, "filename": "Poutyne-0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "232a7f418af09f92e8f8ec75aead4c11", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 83399, "upload_time": "2019-10-01T14:53:29", "url": "https://files.pythonhosted.org/packages/3c/3e/f1bfaa10e802f47496b1e326180f810b1708442b8c9bf7315faf3d267118/Poutyne-0.6-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3fbdf82cff75b8ea45629a04e38e0688", "sha256": "3d59236e881ad6086d88eae921900c918ff094d2bfa55cb1e7bb5dd868a9cd58" }, "downloads": -1, "filename": "Poutyne-0.6.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "3fbdf82cff75b8ea45629a04e38e0688", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 128584, "upload_time": "2019-09-30T19:35:26", "url": "https://files.pythonhosted.org/packages/ee/1f/e37e8f97cb60be5bbb78e17a43da789d53e770cace47d568eb7760f26893/Poutyne-0.6.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "232a7f418af09f92e8f8ec75aead4c11", "sha256": "90cdae5dc17af9adb33ac84382382a499ba5e2b4ae51546c1b8c49820f5266d6" }, "downloads": -1, "filename": "Poutyne-0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "232a7f418af09f92e8f8ec75aead4c11", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 83399, "upload_time": "2019-10-01T14:53:29", "url": "https://files.pythonhosted.org/packages/3c/3e/f1bfaa10e802f47496b1e326180f810b1708442b8c9bf7315faf3d267118/Poutyne-0.6-py3-none-any.whl" } ] }