GldReLU
Golden Ratio ReLU (GldReLU) is a custom activation function for TensorFlow
Golden Ratio ReLU (GldReLU) is a custom activation function for TensorFlow based on the Golden Ratio constant. It can be used in deep learning models just like other activation, and is especially useful for deep networks in medical imaging and research applications.
$$ GldReLU(x) = \max(0, (\phi - 1))\cdot x $$
where:
$$ \phi = \frac{1 + \sqrt{5}}{2} \approx 1.618 $$
so that:
$$ \phi - 1 \approx 0.618 $$
$$ \text{GldReLU}(x) = \begin{cases} 0.618 , x, & \text{if } x > 0 \[2mm] 0, & \text{if } x \leq 0 \end{cases} $$
Installation
pip install gldrelu
Usage Example
1️ Using "GldReLU" as a string (no function import needed)
import tensorflow as tf
import GldReLU # registers GldReLU automatically
model = tf.keras.Sequential([
tf.keras.layers.Dense(128, activation="GldReLU"),
tf.keras.layers.Dense(10, activation="softmax")
])
model.summary()
### Using the function directly
from GldReLU import GldReLU
import tensorflow as tf
model = tf.keras.Sequential([
tf.keras.layers.Dense(128, activation=GldReLU),
tf.keras.layers.Dense(10, activation="softmax")
])
model.summary()
If you use GldReLU in your research, cite:
@article{lakshmi2025novel,
title={A novel GldReLU activation function with enhanced RESNET50 for classification of X-ray images},
author={Lakshmi, P Pankaja and Sivagami, M},
journal={Neural Computing and Applications},
volume={37},
number={26},
pages={21997--22028},
year={2025},
publisher={Springer}
}
Metadata
Release files for gldrelu 1.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 | Provenance | Actions |
|---|---|---|---|---|
| gldrelu-1.1.tar.gz | 2.2 kB | Without provenance | Details for gldrelu-1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gldrelu-1.1-py3-none-any.whl | Python 3 | none | any | Details for gldrelu-1.1-py3-none-any.whl |
Total release size: 4.7 kB
Release files / gldrelu-1.1.tar.gz
| Download URL | gldrelu-1.1.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af356f5fd645146d7bbfd27a466f921d8343c46b06d3b65e2b12541b0cfb8ba9
|
|
BLAKE2b-256 checksum How to use checksums |
8d4b987d194c58e99c29ebad95abbc10060d85e7aeaf8113fe82246fadba6b9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / gldrelu-1.1-py3-none-any.whl
| Download URL | gldrelu-1.1-py3-none-any.whl |
|---|---|
| Size | 2.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a0c92d97b69b16f30eae9bc80f5524b0934616cea83e3eff28d95e504679e560
|
|
BLAKE2b-256 checksum How to use checksums |
40d6802e6fb90d8afd07c5a221482bc5e3fb3a90937163f8a832f865f97dd24e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for gldrelu 1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.