# `pytorch-revgrad`
[](https://badge.fury.io/py/pytorch-revgrad)
[](https://coveralls.io/github/janfreyberg/pytorch-revgrad?branch=master)
[](https://travis-ci.com/janfreyberg/pytorch-revgrad)

[](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[](https://badge.fury.io/py/pytorch-revgrad)\n[](https://coveralls.io/github/janfreyberg/pytorch-revgrad?branch=master)\n[](https://travis-ci.com/janfreyberg/pytorch-revgrad)\n\n[](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"
}