Observed since 20 Oct, 18:35 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Activations Plus is a Python package designed to provide a collection of advanced activation functions for machine learning and deep learning models. These activation functions are implemented to enhance the performance of neural networks by addressing specific challenges such as sparsity, non-linearity, and gradient flow.
To install the package, use pip:
pip install activations-plus
Import and use any activation function in your PyTorch models:
import torch
from activations_plus.sparsemax import Sparsemax
from activations_plus.entmax import Entmax
# Example with Sparsemax
sparsemax = Sparsemax()
x = torch.tensor([[1.0, 2.0, 3.0], [1.0, 2.0, -1.0]])
output_sparsemax = sparsemax(x)
print("Sparsemax Output:", output_sparsemax)
# Example with Entmax
entmax = Entmax(alpha=1.5)
output_entmax = entmax(x)
print("Entmax Output:", output_entmax)
These examples demonstrate how to use Sparsemax and Entmax activation functions in PyTorch models.
Comprehensive documentation is available documentation.
Contributions are welcome! Please read the CONTRIBUTING.md file for guidelines.
To run the tests, use the following command:
pytest tests/
This project is licensed under the MIT License. See the LICENSE file for details.
Special thanks to the contributors and the open-source community for their support.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.1 | 20 Apr 2025 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 18:35 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:1c4f384a96b562352e0d21a95a26efd5730402265b2876682776ede02d15678d