“SPOCU”: scaled polynomial constant unit activation function.
Non-official Pytorch/Tensorflow implementation of the SPOCU activation function [1], for the case when c=infinite.
Installation
You can install this package using pip:
python3 -m pip install spocu
Pytorch
It can be included in your network given an alpha, beta and gamma value:
from spocu.spocu_pytorch import SPOCU
alpha = 3.0937
beta = 0.6653
gamma = 4.437
spocu = SPOCU(alpha, beta, gamma)
x = torch.rand((10,10))
print(spocu(x))
Tensorflow
from spocu.spocu_tensorflow import SPOCU
alpha = 3.0937
beta = 0.6653
gamma = 4.437
spocu = SPOCU(alpha, beta, gamma)
X = tf.Variable(tf.random.normal([10, 10], stddev=5, mean=4) )
print(spocu(X))
Tests
See spocu_test for equivalance of pytorch and tensorflow implementation.
Citation
If you find this work useful, please cite:
@article{carrillo2021deep,
title={Deep learning to classify ultra-high-energy cosmic rays by means of PMT signals},
author={Carrillo-Perez, F and Herrera, LJ and Carceller, JM and Guill{\'e}n, A},
journal={Neural Computing and Applications},
pages={1--17},
year={2021},
publisher={Springer}
}
Acknowledgements
Thanks to the author of the Tensorflow version, Atilla Ozgur.
Bibliography
[1] Kiseľák, J., Lu, Y., Švihra, J. et al. “SPOCU”: scaled polynomial constant unit activation function. Neural Comput & Applic (2020). https://doi.org/10.1007/s00521-020-05182-1
Metadata
Release files for spocu 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spocu-0.0.1.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spocu-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.0 kB
Release files / spocu-0.0.1.tar.gz
| Download URL | spocu-0.0.1.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
872ace24b13fb1c9bee7de49f2a6fe56658b8682392ada873059b836ea4504ba
|
|
BLAKE2b-256 checksum How to use checksums |
4c86029ab89f0c225cfa2fcf5219a7049a53749e95b1aa07b9717c9d9f625f2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.5
|
Release files / spocu-0.0.1-py3-none-any.whl
| Download URL | spocu-0.0.1-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
baa81f341a2e7c7fa98cd5b9da8214991bb47cd28b602ba558f714ce6395014f
|
|
BLAKE2b-256 checksum How to use checksums |
d0b13feae01775b4895dc491b471111f5c819e0b895f4adb16a9b1f448ae6178
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.5
|