Skip to main content

TorchAct, collection of activation function for PyTorch.

Project description

torchact

TorchAct, collection of activation function for PyTorch.


image CI codecov
image PyPI - Status PyPI - Python Version image Downloads
image PyPI - License image

Quick Start

import torch
import torch.nn as nn
from torchact import ReLU

model = nn.Sequential(
    nn.Linear(5, 3),
    ReLU(),
    nn.Linear(3, 1)
)

dummy = torch.rand(1, 5)
print(model(dummy))

Installation

pip install torchact

How to Contribute

Thanks for your contribution!

There are several steps for contributing.

  1. Install library using requirements.txt
  2. Write your code in torchact folder.
  3. Add your module in __init__.py (__version__ cannot be changed. It will be decided later.)

For example.

from .your_module import Your_Module
__all__ = ("ReLU", "SinLU", "Softmax", "Your_Module")
  1. Add your module in test_activation_function.py

For example.

from torchact import Your_Module
test_model.add_module("Your_Module", Your_Module())
  1. Send a PR. Code testing happens automatically. (PYPI is upgraded by the admin himself.)

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

torchact-0.0.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

torchact-0.0.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file torchact-0.0.2.tar.gz.

File metadata

  • Download URL: torchact-0.0.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.13

File hashes

Hashes for torchact-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0d8f33016394d9df5d624e89b20a453d5d595d06955f903e01df8bb11ed36c6d
MD5 39c6b44e33408c6a84edb0a2825a7b9e
BLAKE2b-256 a81f435cada1a533ac7b8c1c9f81add6b01826cd74e44710de3b5752e0714b67

See more details on using hashes here.

File details

Details for the file torchact-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: torchact-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.13

File hashes

Hashes for torchact-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 415e07be115125aba7b5a3ae8f72595f125ea562b90619008a3c21da50a340c2
MD5 951e6863ffaa28d60a14700ae40d161c
BLAKE2b-256 c8bef4c5c608427b243925c072ac1e6750a85f3739de6cee6f5651bfbf0a5828

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