Pade激活单元
pau的Python项目详细描述
PAU-Padé激活装置
Padé激活单元:深层神经网络中激活函数的端到端学习
Arxiv链接:https://arxiv.org/abs/1907.06732
1。关于Padé激活单元
PAUéActivation Units(PAUéActivation Units,PAU)是一种新颖的可学习激活函数。PAUs将激活函数编码为有理函数,可以使用反向传播以端到端的方式进行训练,并且可以像普通的激活函数(例如ReLU)一样将其集成到任何神经网络中。在
在预测性能和训练时间方面,PAU匹配或优于普通激活。 因此,减轻了网络设计师不得不致力于一个可能表现不佳的选择。在
2。依赖关系
PyTorch>=1.1.0
CUDA>=10.1
3。安装
PAU是使用cuda10.2作为pytorch扩展实现的。所以所需要的就是安装扩展。在
^{pr2}$如果安装不起作用,请运行:
pip3 install wheel
{emcU1>下载相应版本的PYEM1>并安装轮子:
pip3 install pau-0.0.16-101-cp{your_version}-manylinux2014_x86_64.whl
如果您在安装pau时遇到任何问题,请联系this person。在
4。PAU在神经网络中的应用
PAU可以与任何其他常用激活功能一样进行集成。在
import torch
from pau_torch import PAU
model = torch.nn.Sequential(
torch.nn.Linear(D_in, H),
PAU(), # e.g. instead of torch.nn.ReLU()
torch.nn.Linear(H, D_out),
)
5。复制结果
要重现报告的论文结果,请执行以下操作:
$export PYTHONPATH=“./” $python实验/主.py--数据集mnist--arch conv--优化器adam--lr 2e-3
# DATASET: Name of the dataset, for MNIST use mnist and for Fashion-MNIST use fmnist
# ARCH: selected neural network architecture: vgg, lenet or conv
# OPTIMIZER: either adam or sgd
# LR: learning rate
- 项目
标签: