Current collected state Current
Observed since 20 Oct, 18:38 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A collection of novel and experimental activation functions for TensorFlow and PyTorch
A collection of novel and experimental activation functions for deep learning, supporting both TensorFlow/Keras and PyTorch.
pip install actix # Auto-detects installed frameworks
pip install actix[tf] # TensorFlow only
pip install actix[torch] # PyTorch only
pip install actix[tf,torch] # Both frameworks
from actix import OptimA, ATanSigmoid, get_activation
import tensorflow as tf
# Direct usage
model = tf.keras.Sequential([
tf.keras.layers.Dense(128, input_shape=(784,)),
OptimA(),
tf.keras.layers.Dense(64),
ATanSigmoid(),
tf.keras.layers.Dense(10, activation='softmax')
])
# Using getter function
activation = get_activation('OptimA', framework='tensorflow')
from actix import OptimATorch, ATanSigmoidTorch
import torch.nn as nn
class Model(nn.Module):
def __init__(self):
super().__init__()
self.fc1 = nn.Linear(784, 128)
self.act1 = OptimATorch()
self.fc2 = nn.Linear(128, 64)
self.act2 = ATanSigmoidTorch()
self.fc3 = nn.Linear(64, 10)
def forward(self, x):
x = self.act1(self.fc1(x))
x = self.act2(self.fc2(x))
return self.fc3(x)
| Function | Key Strength | Best Use Case |
|---|---|---|
ATanSigU | Best overall performance | General-purpose, especially classification (77.63% on CIFAR-10) |
A_ELuC | Consistent across tasks | When you need reliable performance everywhere |
| Rank | Activation Function | CIFAR-10 Accuracy |
|---|---|---|
| 1 | ATanSigU | 77.63% |
| 2 | AdaptiveSinusoidalSoftgate | 77.52% |
| 3 | ParametricLogish | 77.48% |
| 4 | SmoothedAbsoluteGatedUnit | 77.43% |
| 5 | A_ELuC | 77.21% |
| Rank | Activation Function | MSE | Improvement vs Baseline |
|---|---|---|---|
| 1 | SymmetricParametricRationalSigmoid | 0.2183 | -17.75% |
| 2 | OptimA | 0.2211 | -16.70% |
| 3 | OptimXTemporal | 0.2213 | -16.62% |
| Rank | Activation Function | MSE | Improvement vs Baseline |
|---|---|---|---|
| 1 | ParametricBetaSoftsign | 0.4564 | -2.37% |
| 2 | A_ELuC | 0.4567 | -2.31% |
| 3 | SmoothedAbsoluteGatedUnit | 0.4590 | -1.82% |
| Function | Characteristics | Application Domain |
|---|---|---|
ComplexHarmonicActivation | Demonstrates significant potential, requires precise hyperparameter optimization | Advanced research applications with computational flexibility |
WeibullSoftplusActivation | Exhibits robust performance with predictable convergence properties | Production systems requiring high stability and reliability |
GeneralizedAlphaSigmoid | Provides domain-specific adaptability through parameterization | Specialized tasks requiring function customization |
OptimQ | Integrates three activation mechanisms with extensive configurability | Complex architectures demanding high adaptability |
StabilizedHarmonic | Captures periodic patterns while maintaining numerical stability | Temporal modeling, signal processing, and cyclic phenomena |
AdaptiveArcTanSwish | Achieves optimal balance between computational efficiency and expressiveness | Regression tasks requiring enhanced performance |
import actix
# Visualize activation function and its derivative
actix.plot_activation('GeneralizedAlphaSigmoid', framework='tf')
actix.plot_derivative('GeneralizedAlphaSigmoid', framework='tf')
For complete function list and mathematical formulas, see actix/activations_tf.py
For detailed benchmarks, check:
We welcome contributions! Please:
MIT License - see LICENSE file for details.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.5.0 | 18 Jun 2025 | 5 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 18:38 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:f6e5420039de730b61ece6d659577015698ba099507089d5fd40901d46b99a7b