Pade Activation Unit
Project description
PAU - Padé Activation Units
Padé Activation Units: End-to-end Learning of Activation Functions in Deep Neural Network
Arxiv link: https://arxiv.org/abs/1907.06732
1. About Padé Activation Units
Padé Activation Units (PAU) are a novel learnable activation function. PAUs encode activation functions as rational functions, trainable in an end-to-end fashion using backpropagation and can be seemingless integrated into any neural network in the same way as common activation functions (e.g. ReLU).
PAU matches or outperforms common activations in terms of predictive performance and training time. And, therefore relieves the network designer of having to commit to a potentially underperforming choice.
2. Dependencies
PyTorch>=1.1.0
CUDA>=10.1
3. Installation
PAU is implemented as a pytorch extension using CUDA 10.2. So all that is needed is to install the extension.
pip3 install --upgrade pip
pip3 install pau
If installation does not work, please run:
pip3 install wheel
For CUDA 10.1, download the wheel corresponding to your python3 version in the wheelhouse repo and install it with:
pip3 install pau-0.0.16-101-cp{your_version}-manylinux2014_x86_64.whl
If you encounter any trouble installing pau, please contact this person.
4. Using PAU in Neural Networks
PAU can be integrated in the same way as any other common activation function.
import torch
from pau_torch import PAU
model = torch.nn.Sequential(
torch.nn.Linear(D_in, H),
PAU(), # e.g. instead of torch.nn.ReLU()
torch.nn.Linear(H, D_out),
)
5. Reproducing Results
To reproduce the reported results of the paper execute:
$ export PYTHONPATH="./" $ python experiments/main.py --dataset mnist --arch conv --optimizer adam --lr 2e-3
# DATASET: Name of the dataset, for MNIST use mnist and for Fashion-MNIST use fmnist
# ARCH: selected neural network architecture: vgg, lenet or conv
# OPTIMIZER: either adam or sgd
# LR: learning rate
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 Distributions
Built Distributions
File details
Details for the file pau-0.0.17-102-cp38-cp38-manylinux2014_x86_64.whl
.
File metadata
- Download URL: pau-0.0.17-102-cp38-cp38-manylinux2014_x86_64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3eb785a583a45a17e912e661c16dcacdf1f03124e1e77d888b042736d74902a9 |
|
MD5 | 1b63da745ebcd25909281b8b6bea19f5 |
|
BLAKE2b-256 | 02d524c96d4c8c3288588bae073fd82fdf48e2c84b54b9f721ef9a43bd0e6129 |
File details
Details for the file pau-0.0.17-102-cp37-cp37m-manylinux2014_x86_64.whl
.
File metadata
- Download URL: pau-0.0.17-102-cp37-cp37m-manylinux2014_x86_64.whl
- Upload date:
- Size: 3.9 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f90527901f560b9715f7c393a4e2ab271bac03500cb0ef1cb925a986bcbe6d4a |
|
MD5 | d4662bce9ed6e63578faf62df880a02d |
|
BLAKE2b-256 | bddb1282eda14a1b5df216dceec5caf3577d4fcbed6ad8a9ad3adc43b7c8c43c |
File details
Details for the file pau-0.0.17-102-cp36-cp36m-manylinux2014_x86_64.whl
.
File metadata
- Download URL: pau-0.0.17-102-cp36-cp36m-manylinux2014_x86_64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa0c943742247597d59ca08a3d5975603d9883e817be25c65eb699c7eaf77d77 |
|
MD5 | b386cc869c4a2d77c235e588705dc902 |
|
BLAKE2b-256 | f3444a3a78ae60cf1b75a5b964490a8f9f796e608501d5c616572118420a18ef |
File details
Details for the file pau-0.0.17-101-cp38-cp38-manylinux2014_x86_64.whl
.
File metadata
- Download URL: pau-0.0.17-101-cp38-cp38-manylinux2014_x86_64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fceec444fe5a7d9bb78241ed480b6cbea0b9c340baadb08bd8eaaa3195090d5 |
|
MD5 | 9e5878730f7fface78511e87b0b7e11d |
|
BLAKE2b-256 | 6c0f62fdb6be9975f7222065cd0778f536e14ba5994b0198a644adfd5a04937c |
File details
Details for the file pau-0.0.17-101-cp37-cp37m-manylinux2014_x86_64.whl
.
File metadata
- Download URL: pau-0.0.17-101-cp37-cp37m-manylinux2014_x86_64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7f933c0a8f26f3852ccfb965187b8ddfb1c6276a43395b92a7867739fcc8839 |
|
MD5 | 40092380981691b805aa596cd29088ea |
|
BLAKE2b-256 | 82167f2dbdb9fd295e423e769c5d6ecb21994f500678462d01b46cb2db6c841a |
File details
Details for the file pau-0.0.17-101-cp36-cp36m-manylinux2014_x86_64.whl
.
File metadata
- Download URL: pau-0.0.17-101-cp36-cp36m-manylinux2014_x86_64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6110e84325ecca3921d6134c028f62e8ee0c6c8d7e4482c370eb6914e610911 |
|
MD5 | 4aca919912e9f0690049a9464fdb5d13 |
|
BLAKE2b-256 | 05e567e5c2018f7f8a0586d06b053321a6c0a0251bac1c1db10f99bcdecc7ecc |