• Infrared and Laser Engineering
  • Vol. 51, Issue 3, 20210253 (2022)
Shengjie Du, Xiaofen Jia, Yourui Huang, Yongcun Guo, and Baiting Zhao
Author Affiliations
  • School of Electrical and Information Engineering, Anhui University of Science and Technolog, Huainan 232000, China
  • show less
    DOI: 10.3788/IRLA20210253 Cite this Article
    Shengjie Du, Xiaofen Jia, Yourui Huang, Yongcun Guo, Baiting Zhao. High efficient activation function design for CNN model image classification task[J]. Infrared and Laser Engineering, 2022, 51(3): 20210253 Copy Citation Text show less
    (a) f1, (b) f2, (c) f3,(d) f4 functions and images
    Fig. 1. (a) f1, (b) f2, (c) f3,(d) f4 functions and images
    Derivatives of (a)f1, (b) f2,(c) f3,(d) f4 and their graphs
    Fig. 2. Derivatives of (a)f1, (b) f2,(c) f3,(d) f4 and their graphs
    Test accuracy (a) and training time (b) of different activation functions using ResNet18 network on CIFAR10
    Fig. 3. Test accuracy (a) and training time (b) of different activation functions using ResNet18 network on CIFAR10
    Test accuracy (a) and training time (b) of different activation functions using VGG16 network on CIFAR10
    Fig. 4. Test accuracy (a) and training time (b) of different activation functions using VGG16 network on CIFAR10
    Test accuracy (a) and training time (b) of different activation functions using ResNet18 network on CIFAR100
    Fig. 5. Test accuracy (a) and training time (b) of different activation functions using ResNet18 network on CIFAR100
    Test accuracy (a) and training time (b) of different activation functions using VGG16 network on CIFAR100
    Fig. 6. Test accuracy (a) and training time (b) of different activation functions using VGG16 network on CIFAR100
    Test accuracy (a) and training time (b) of different activation functions using ResNet18 network on Fer2013
    Fig. 7. Test accuracy (a) and training time (b) of different activation functions using ResNet18 network on Fer2013
    Test accuracy (a) and training time (b) of different activation functions using VGG16 network on Fer2013
    Fig. 8. Test accuracy (a) and training time (b) of different activation functions using VGG16 network on Fer2013
    FunctionFunction model
    f1${f_1}(x) = \left\{ {\begin{array}{*{20}{c}} {\;\;x\;,x \geqslant 0} \\ { - x,x < 0} \end{array}} \right.$
    f2${f_2}(x) = \left\{ {\begin{array}{*{20}{c} } {\quad \;\;x\;\;\;\;\;\,\;,x \geqslant 0} \\ { - \dfrac{2}{3}{ {( - x)}^{\frac{3}{2} } },x < 0} \end{array} } \right.$
    f3${f_3}(x) = \left\{ {\begin{array}{*{20}{c} } {\quad x\;\;,x \geqslant 0} \\ {\dfrac{x}{ {1 - x} },x < 0} \end{array} } \right.$
    f4${f_4}(x) = \left\{ {\begin{array}{*{20}{c}} {\;\;\;{\kern 1pt} {\kern 1pt} {\kern 1pt} x\quad ,x \geqslant 0} \\ { - {{\ln }^{1 - x}},x < 0} \end{array}} \right.$
    Table 1. Mathematical models of four activation functions
    Derived functionFunction model
    f1’ ${f_1}^\prime (x) = \left\{ {\begin{array}{*{20}{c}} {\;\,1\;,x \geqslant 0} \\ { - 1,x < 0} \end{array}} \right.$
    f2’ ${f_2}^\prime (x) = \left\{ {\begin{array}{*{20}{c}} {\;\quad \;\;1\quad \;,x \geqslant 0} \\ { - \sqrt {( - x)} ,x < 0} \end{array}} \right.$
    f3’ ${f_3}^\prime (x) = \left\{ {\begin{array}{*{20}{c} } 1 \\ {\dfrac{1}{ { { {(1 - x)}^2} } } } \end{array} } \right.\begin{array}{*{20}{c} } {,x \geqslant 0} \\ {,x < 0} \end{array}$
    f4’ ${f_4}^\prime (x) = \left\{ {\begin{array}{*{20}{c} } {\;\;\;1\;\;{\kern 1pt} \;,x \geqslant 0} \\ {\dfrac{1}{ {1 - x} },x < 0} \end{array} } \right.$
    Table 2. Four kinds of activation function derivative function model
    Results Methods Datasets
    CIFAR10CIFAR100
    ACCT/h ACCT/h
    f193.11%1.33274.82%1.332
    f293.03%1.33574.27%1.335
    f393.66%1.29075.23%1.290
    f493.78%1.26275.87%1.262
    ReLU92.90%1.32573.68%1.325
    Table 3. Performance of different activation functions on the ResNet18 network
    Results Methods Datasets
    CIFAR10CIFAR100
    ACCT/h ACCT/h
    f191.31%1.22558.91%1.225
    f291.24%1.24858.35%1.248
    f391.86%1.24359.23%1.243
    f491.98%1.17559.95%1.175
    ReLU91.15%1.23856.24%1.238
    Table 4. Performance of different activation functions on the VGG16 network
    Shengjie Du, Xiaofen Jia, Yourui Huang, Yongcun Guo, Baiting Zhao. High efficient activation function design for CNN model image classification task[J]. Infrared and Laser Engineering, 2022, 51(3): 20210253
    Download Citation