TorchAct, collection of activation function for PyTorch.
Project description
torchact
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.
- Install library using
requirements.txt
- Write your code in torchact folder.
- 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")
- Add your module in
test_activation_function.py
For example.
from torchact import Your_Module
test_model.add_module("Your_Module", Your_Module())
- Send a PR. Code testing happens automatically. (PYPI is upgraded by the admin himself.)
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d8f33016394d9df5d624e89b20a453d5d595d06955f903e01df8bb11ed36c6d |
|
MD5 | 39c6b44e33408c6a84edb0a2825a7b9e |
|
BLAKE2b-256 | a81f435cada1a533ac7b8c1c9f81add6b01826cd74e44710de3b5752e0714b67 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 415e07be115125aba7b5a3ae8f72595f125ea562b90619008a3c21da50a340c2 |
|
MD5 | 951e6863ffaa28d60a14700ae40d161c |
|
BLAKE2b-256 | c8bef4c5c608427b243925c072ac1e6750a85f3739de6cee6f5651bfbf0a5828 |