Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 1003 Bytes

README.md

File metadata and controls

23 lines (17 loc) · 1003 Bytes

pytorch-revgrad

PyPI version Coverage Status ci status python version License: MIT

This package implements a gradient reversal layer for pytorch modules.

Example usage

import torch

from pytorch_revgrad import RevGrad

model = torch.nn.Sequential(
    torch.nn.Linear(10, 5),
    torch.nn.Linear(5, 2),
    RevGrad()
)