包含机器学习中使用的所有自定义和sota数学后端算法的python包。
echoA的Python项目详细描述
回声ai
包含机器学习中使用的所有数学后端算法的python包。 提供了echo的完整文档here。
目录
关于
echo ai包的创建是为了提供最有前途的数学算法的实现,而这些算法在最流行的深度学习库(如PyTorch,Keras)和 TensorFlow。
激活功能
该包包含以下激活函数的实现(实现的函数,即将实现的函数,:white_large_square:-函数在原始的deep learning包中实现):
# | Function | Equation | Keras | PyTorch | TensorFlow-Keras | TensorFlow - Core |
---|---|---|---|---|---|---|
1 | Weighted Tanh | ✅ | ✅ | ✅ | 🕑 | |
2 | Swish | ✅ | ✅ | ✅ | 🕑 | |
3 | ESwish | ✅ | ✅ | ✅ | 🕑 | |
4 | Aria2 | ✅ | ✅ | ✅ | 🕑 | |
5 | ELiSH | ✅ | ✅ | ✅ | 🕑 | |
6 | HardELiSH | ✅ | ✅ | ✅ | 🕑 | |
7 | Mila | ✅ | ✅ | ✅ | 🕑 | |
8 | SineReLU | ✅ | ✅ | ✅ | 🕑 | |
9 | Flatten T-Swish | ✅ | ✅ | ✅ | 🕑 | |
10 | SQNL | ✅ | ✅ | ✅ | 🕑 | |
11 | ISRU | ✅ | ✅ | ✅ | 🕑 | |
12 | ISRLU | ✅ | ✅ | ✅ | 🕑 | |
13 | Bent's identity | ✅ | ✅ | ✅ | 🕑 | |
14 | Soft Clipping | ✅ | ✅ | ✅ | 🕑 | |
15 | SReLU | ✅ | ✅ | ✅ | 🕑 | |
15 | BReLU | 🕑 | ✅ | ✅ | 🕑 | |
16 | APL | 🕑 | ✅ | ✅ | 🕑 | |
17 | Soft Exponential | ✅ | ✅ | ✅ | 🕑 | |
18 | Maxout | 🕑 | ✅ | ✅ | 🕑 | |
19 | Mish | ✅ | ✅ | ✅ | 🕑 | |
20 | Beta Mish | ✅ | ✅ | ✅ | 🕑 | |
21 | RReLU | 🕑 | ⬜ | 🕑 | 🕑 | |
22 | CELU | ✅ | ⬜ | ✅ | 🕑 | |
23 | ReLU6 | ✅ | ⬜ | 🕑 | 🕑 | |
24 | HardTanh | ✅ | ⬜ | ✅ | 🕑 | |
25 | GLU | 🕑 | ⬜ | 🕑 | 🕑 | |
26 | LogSigmoid | ✅ | ⬜ | ✅ | 🕑 | |
27 | TanhShrink | ✅ | ⬜ | ✅ | 🕑 | |
28 | HardShrink | ✅ | ⬜ | ✅ | 🕑 | |
29 | SoftShrink | ✅ | ⬜ | ✅ | 🕑 | |
30 | SoftMin | ✅ | ⬜ | ✅ | 🕑 | |
31 | LogSoftmax | ✅ | ⬜ | ✅ | 🕑 | |
32 | Gumbel-Softmax | 🕑 | ⬜ | 🕑 | 🕑 |
存储库结构
存储库具有以下结构:
-echoAI# main package directory|-Activation# sub-package containing activation functions implementation||-Torch# sub-package containing implementation for PyTorch|||-functional.py# script which contains implementation of activation functions|||-weightedTanh.py# activation functions wrapper class for PyTorch|||-...# PyTorch activation functions wrappers||-Keras# sub-package containing implementation for Keras|||-custom_activations.py# script which contains implementation of activation functions||-TF_Keras# sub-package containing implementation for Tensorflow-Keras|||-custom_activation.py# script which contains implementation of activation functions|-__init__.py-Observations# Folder containing other assets-docs# Sphinx documentation folder-LICENSE# license file-README.md-setup.py# package setup file-Smoke_tests# folder, which contains scripts with demonstration of activation functions usage-Unit_tests# folder, which contains unit test scripts
设置说明
要从pypi安装echoai包,请运行以下命令:
$ pip install echoAI
代码示例:
示例脚本在Smoke_tests文件夹中提供。 您可以使用Echoai的激活功能,简单如下:
# import PyTorchimporttorch# import activation function from echoAIfromechoAI.Activation.Torch.mishimportMish# apply activation functionmish=Mish()t=torch.tensor(0.1)t_mish=mish(t)