Skip to main content

Actix Functions

PyPI version License: MIT

A collection of novel and experimental activation functions for deep learning, supporting both TensorFlow/Keras and PyTorch.

Key Features

  • 50+ activation functions including custom parametric and static variants
  • Dual framework support for TensorFlow/Keras and PyTorch
  • Proven performance gains over standard activations in benchmarks
  • Simple API with direct imports and getter functions

Installation

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

Quick Start

TensorFlow/Keras

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')

PyTorch

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)

Recommended Activations

Universal Top Performers

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

Classification Leaders

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%

Regression Champions

California Housing Dataset

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%

Diabetes Dataset

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%

Experimental Functions

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

Visualization Tools

import actix

# Visualize activation function and its derivative
actix.plot_activation('GeneralizedAlphaSigmoid', framework='tf')
actix.plot_derivative('GeneralizedAlphaSigmoid', framework='tf')

Requirements

  • Python 3.7+
  • NumPy ≥1.19
  • Matplotlib ≥3.3
  • TensorFlow ≥2.4 (optional)
  • PyTorch ≥1.8 (optional)

Documentation

For complete function list and mathematical formulas, see actix/activations_tf.py

For detailed benchmarks, check:

Contributing

We welcome contributions! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functions
  4. Ensure code follows PEP8 standards
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Metadata

Release files for actix 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for actix 0.5.0
File Size Uploaded Provenance
actix-0.5.0.tar.gz 25.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for actix 0.5.0
File Interpreter ABI Platform
actix-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 46.8 kB

Release files / actix-0.5.0.tar.gz

Download URL actix-0.5.0.tar.gz
Size 25.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3a26c71c24b1670d0da2198fa14109a73e6e5d3ce2710c47103920dcd23b1d75
BLAKE2b-256 checksum
How to use checksums
613a0a46af817fd14872abc9ac1da9199111dc29c265a8af718ec81218cd7034
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.10

Release files / actix-0.5.0-py3-none-any.whl

Download URL actix-0.5.0-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
833ab4c3eebfffb50d08737f744e8ecf280944adb125c140816018f367bbcd2f
BLAKE2b-256 checksum
How to use checksums
655e755ff6f78b00959dafc1897edcfda42753c69f4d308705631b7e95753bef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.10

Security for actix 0.5.0

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.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page