# `pytorch-revgrad`
[![PyPI version](https://badge.fury.io/py/pytorch-revgrad.svg)](https://badge.fury.io/py/pytorch-revgrad)
[![Coverage Status](https://coveralls.io/repos/github/janfreyberg/pytorch-revgrad/badge.svg?branch=master)](https://coveralls.io/github/janfreyberg/pytorch-revgrad?branch=master)
[![ci status](https://travis-ci.org/janfreyberg/pytorch-revgrad.svg?branch=master)](https://travis-ci.com/janfreyberg/pytorch-revgrad)
![python version](https://camo.githubusercontent.com/0a3ef56c3f80aca9bc6bafeab605803d81fe2284/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f707974686f6e2d332e352532422d626c75652e737667)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
This package implements a gradient reversal layer for pytorch modules.
## Example usage
```python
import torch
from pytorch_revgrad import RevGrad
model = torch.nn.Sequential(
torch.nn.Linear(10, 5),
torch.nn.Linear(5, 2),
RevGrad()
)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/janfreyberg/pytorch-revgrad",
"name": "pytorch_revgrad",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": "",
"keywords": "",
"author": "Jan Freyberg",
"author_email": "jan.freyberg@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/90/c3/aecc90deea743b93757e05e235f70eef479509eb3eb11b19f3aa0d528541/pytorch_revgrad-0.2.0.tar.gz",
"platform": "",
"description": "# `pytorch-revgrad`\n\n[![PyPI version](https://badge.fury.io/py/pytorch-revgrad.svg)](https://badge.fury.io/py/pytorch-revgrad)\n[![Coverage Status](https://coveralls.io/repos/github/janfreyberg/pytorch-revgrad/badge.svg?branch=master)](https://coveralls.io/github/janfreyberg/pytorch-revgrad?branch=master)\n[![ci status](https://travis-ci.org/janfreyberg/pytorch-revgrad.svg?branch=master)](https://travis-ci.com/janfreyberg/pytorch-revgrad)\n![python version](https://camo.githubusercontent.com/0a3ef56c3f80aca9bc6bafeab605803d81fe2284/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f707974686f6e2d332e352532422d626c75652e737667)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nThis package implements a gradient reversal layer for pytorch modules.\n\n## Example usage\n\n```python\nimport torch\n\nfrom pytorch_revgrad import RevGrad\n\nmodel = torch.nn.Sequential(\n torch.nn.Linear(10, 5),\n torch.nn.Linear(5, 2),\n RevGrad()\n)\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "A pytorch module (and function) to reverse gradients.",
"version": "0.2.0",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "0cca2daedc6b24de9a6063d2be189b31",
"sha256": "2276fb189b2ce26f756a97effe2a6bcf8f7fdc60542c5dfb45c53f09ef123aa7"
},
"downloads": -1,
"filename": "pytorch_revgrad-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0cca2daedc6b24de9a6063d2be189b31",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5",
"size": 4564,
"upload_time": "2021-01-09T17:35:47",
"upload_time_iso_8601": "2021-01-09T17:35:47.543075Z",
"url": "https://files.pythonhosted.org/packages/ec/e9/10b11b186b99c40213dca68cf6c38051b6704a74e1056d3f3ca4c12f14b9/pytorch_revgrad-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "3ea51b11a52967d8e261d328dcb24932",
"sha256": "9cf097a7d18cbadddeaec9fef74b258d70b6cb8d0c77f524baab18bffc7d7be9"
},
"downloads": -1,
"filename": "pytorch_revgrad-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "3ea51b11a52967d8e261d328dcb24932",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 7086,
"upload_time": "2021-01-09T17:35:49",
"upload_time_iso_8601": "2021-01-09T17:35:49.131899Z",
"url": "https://files.pythonhosted.org/packages/90/c3/aecc90deea743b93757e05e235f70eef479509eb3eb11b19f3aa0d528541/pytorch_revgrad-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2021-01-09 17:35:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "janfreyberg",
"github_project": "pytorch-revgrad",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"lcname": "pytorch_revgrad"
}