https://github.com/janfreyberg/pytorch-revgrad
A minimal pytorch package implementing a gradient reversal layer.
https://github.com/janfreyberg/pytorch-revgrad
domain-adaptation gradient-reversal pytorch
Last synced: 5 months ago
JSON representation
A minimal pytorch package implementing a gradient reversal layer.
- Host: GitHub
- URL: https://github.com/janfreyberg/pytorch-revgrad
- Owner: janfreyberg
- License: mit
- Created: 2019-03-30T12:10:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-04T15:03:33.000Z (11 months ago)
- Last Synced: 2025-04-08T02:39:06.097Z (6 months ago)
- Topics: domain-adaptation, gradient-reversal, pytorch
- Language: Python
- Homepage:
- Size: 42 KB
- Stars: 158
- Watchers: 2
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `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 torchfrom pytorch_revgrad import RevGrad
model = torch.nn.Sequential(
torch.nn.Linear(10, 5),
torch.nn.Linear(5, 2),
RevGrad()
)
```