Skip to main content

A pytorch module (and function) to reverse gradients.

Project description

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()
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytorch_revgrad-0.2.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

pytorch_revgrad-0.2.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pytorch_revgrad-0.2.0.tar.gz.

File metadata

  • Download URL: pytorch_revgrad-0.2.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.24.0

File hashes

Hashes for pytorch_revgrad-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9cf097a7d18cbadddeaec9fef74b258d70b6cb8d0c77f524baab18bffc7d7be9
MD5 3ea51b11a52967d8e261d328dcb24932
BLAKE2b-256 90c3aecc90deea743b93757e05e235f70eef479509eb3eb11b19f3aa0d528541

See more details on using hashes here.

File details

Details for the file pytorch_revgrad-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytorch_revgrad-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2276fb189b2ce26f756a97effe2a6bcf8f7fdc60542c5dfb45c53f09ef123aa7
MD5 0cca2daedc6b24de9a6063d2be189b31
BLAKE2b-256 ece910b11b186b99c40213dca68cf6c38051b6704a74e1056d3f3ca4c12f14b9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page