Computer Science ›› 2020, Vol. 47 ›› Issue (5): 144-148.doi: 10.11896/jsjkx.190700176

• Computer Graphics & Multimedia • Previous Articles     Next Articles

Quantizing Weights and Activations in Generative Adversarial Networks

ZHENG Zhe1,2,3, HU Qing-hao2, LIU Qing-shan1,3, LENG Cong2   

  1. 1 School of Automation,Nanjing University of Information Science &Technology,Nanjing 210044,China
    2 Artificial Intelligence Chip Research,Institute of Automation,Chinese Academy of Science,Nanjing 211100,China
    3 Jiangsu Key Lab of Big Data Analysis Technology,Nanjing 210044,China
  • Received:2019-07-25 Online:2020-05-15 Published:2020-05-19
  • About author:ZHENG Zhe,postgraduate.His main research interests include deep network compression and so on.
    LIU Qin-shan,professor.His main research interests include image and vision analysis,including face image analysis,graph and hypergraph-based image and video understanding,medical image analysis,and event-based video analysis.

Abstract: In recent years,generative adversarial network have shown excellent performance in many computer vision tasks such as ima-ge super resolution,image generation and so on.GANs can be designed to be much more greedy in computation complexity because of huge quantity uses of GPU application.For mobile devices that are resource-limited,however,on which it is intractable for GAN on be deployed due to high consumption both in energy and computation.Thanks for great success in neural network compression,it is possible to deploy GAN on mobile devices.This paper proposed a method to simultaneously quantize weights and activations in GANs.Sensitivity analysis shows that weights are more sensitive than activation in quantization process.This paper used Fréchet Inception Distance (FID)score to evaluate generated images of quantized GANs for Inception score is less applicable than FID.Motivated by sensitivity analysis,extensive experiments were conducted on Mnist and Celeb-A datasets.Results show that the proposed method can compress GANs by up to 4x and still achieve even higher performance than the original GANs.Thus,it effectively resolves the problem of compressing GANs.

Key words: Generative adversarial networks, Mobile devices, Neural network compression, Quantization, Source-limited

CLC Number: 

  • TP391
[1]GOODFELLOW IAN J.Generative adversarial nets[C]//Proceedings of the Neural Information Processing Systems.2014:2672-2680.
[2]KRIZHEVSKY A.ImageNet classification with deep convolutional neural networks[C]//Proceedings of the Neural Information Processing Systems.2012:1106-1114.
[3]BROCK A,DONAHUE J,SIMONYAN K.Large Scale GAN Training for High Fidelity Natural Image Synthesis[J].arXiv:1809.11096.
[4]WANG P,WANG D,JI Y,et al.QGAN:Quantized Generative Adversarial Networks[J].arXiv:1901.08263.
[5]ANGELINE A,CHIANG P,GAIN A,et al.Compressing gans using knowledge distillation[J].arXiv:1902.00159.
[6]HEUSEL M,RAMSAUER H,UNTERHINER T,et al.GANs Trained by a TWO Time-Scale Update Rule Converge to a Local Nash Equilibrium[J].arXiv:1706.08500.
[7]SALIMANS T,GOODFELLOW I,ZAREMBA W,et al.Im-proved Techniques for Training GANs[C]//Proceedings of the Neural Information Processing Systems.2016:2234-2242.
[8]MIRZA M,OSINDERO S.Conditional generative adversarialnets[J].arXiv:1411.1784.
[9]KARRAS T,AILA T,LAINE S,et al.Progressivegrowing of gans for improved quality,stability,andvariation[J].arXiv:1710.10196.
[10]RADFORD A,METZ L,CHINTALA S.Unsupervised representation learning with deep convolutional generative adversarial networks[J].arXiv:1511.06434.
[11]ARJOVSKY M,CHINTALA S,BOTTOU L.Wasserstein gan[J].arXiv:1701.07875.
[12]GULRAJANI I,AHMED F,ARJOVSKY M,et al.CImproved training of wasserstein gans[C]//Proceedings of the Neural Information Processing Systems.2017:5767-5777.
[13]HUBARA I,COURBARIAUX M,SOUDRY D,et al.Binarized neural networks[C]//Proceedings of Neural Information Processing Systems.2016:4107-4115.
[14]COURBARIAUX M,BENGIO Y,DAVID J.Binaryconnect:Training deep neural networks with binary weights duringpro-pagations[C]//Proceedings of the Neural Information Proces-sing.2015:3123-3131.
[15]RASTEGARI M.XNOR-Net:ImageNet Classification Using Binary Convolutional Neural Networks[C]//Proceedings of the European Conference on Computer Vision.2016:525-542.
[16]HU Q H,WANG P S,CHENG J.From Hashing to CNNs:Training Binary Weight Networks via Hashing[C]//Procee-dings of theAAAI Conferenceon Artificial Intelligence.2018:3247-3254.
[17]LIN X,ZHAO C,PAN W.Towards accurate binary convolutional neural network.[C]//Proceedings of the Neural Information Processing Systems.Montreal,2017:345-353.
[18]ZHOU A J,YAO A B,GUO Y W,et al.Incremental Network Quantization:Towards Lossless CNNs with Low-Precision Weights[J].arXiv:1702.03044.
[19]LI Z,NI B,ZHANG W,et al.Performance guaranteed net-workacceleration via high-order residual quantization[C]//Proceedings of the International Conference on Computer Vision.2017:2584-2592.
[20]FROMM J,PATEL S,PHILIPOSE M.Heterogeneous Bitwidth Binarization in Convolutional Neural Networks[C]//Procee-dings of the Neural Information Processing Systems.2018:4006-4015.
[21]WANG K,LIU Z J,LIN Y J,et al.HAQ:Hardware-Aware Automated Quantization[J].arXiv:1811.08886.
[22]ZHOU S C,WU Y X,NI Z K,et al.DoReFa-Net:Training Low Bitwidth Convolutional Neural Networks with Low Bitwidth Gradients[J].arXiv:1606.06160.
[23]ZHANG D Q,YANG J L,YE D Q Z,et al.LQ-Nets:Learned Quantization for Highly Accurate and Compact Deep Neural Networks[C]//Proceedings of European Conference on Computer Vision.2018.
[24]ZHUANG B H,SHEN C H,TAN M K,et al.Structured Binary Neural Networks for Accurate Image Classification and Semantic Segmentation[J].arXiv:1811.10413.
[25]CAI Z,HE X,SUN J,et al.Deep learning with low precision by halfwavegaussian quantization[C]//Proceedings of IEEE Conference on Computer Vision and Pattern Recognition.New York:IEEE Press,2017:5918-5926.
[26]BENGIO Y,LÉONARD N,COURVILLE A.Estimating orpropagating gradientsthrough stochastic neurons for conditional computation[J].arXiv:1308.3432.
[27]SHANE B,RISHI S.A Note on the Inception Score[J].arXiv:1801.01973.
[1] WANG Guan-yu, ZHONG Ting, FENG Yu, ZHOU Fan. Collaborative Filtering Recommendation Method Based on Vector Quantization Coding [J]. Computer Science, 2022, 49(9): 48-54.
[2] XU Guo-ning, CHEN Yi-peng, CHEN Yi-ming, CHEN Jin-yin, WEN Hao. Data Debiasing Method Based on Constrained Optimized Generative Adversarial Networks [J]. Computer Science, 2022, 49(6A): 184-190.
[3] XU Hui, KANG Jin-meng, ZHANG Jia-wan. Digital Mural Inpainting Method Based on Feature Perception [J]. Computer Science, 2022, 49(6): 217-223.
[4] DOU Zhi, WANG Ning, WANG Shi-jie, WANG Zhi-hui, LI Hao-jie. Sketch Colorization Method with Drawing Prior [J]. Computer Science, 2022, 49(4): 195-202.
[5] GAO Zhi-yu, WANG Tian-jing, WANG Yue, SHEN Hang, BAI Guang-wei. Traffic Prediction Method for 5G Network Based on Generative Adversarial Network [J]. Computer Science, 2022, 49(4): 321-328.
[6] LI Si-quan, WAN Yong-jing, JIANG Cui-ling. Multiple Fundamental Frequency Estimation Algorithm Based on Generative Adversarial Networks for Image Removal [J]. Computer Science, 2022, 49(3): 179-184.
[7] TAN Xin-yue, HE Xiao-hai, WANG Zheng-yong, LUO Xiao-dong, QING Lin-bo. Text-to-Image Generation Technology Based on Transformer Cross Attention [J]. Computer Science, 2022, 49(2): 107-115.
[8] ZHANG Wei-qi, TANG Yi-feng, LI Lin-yan, HU Fu-yuan. Image Stream From Paragraph Method Based on Scene Graph [J]. Computer Science, 2022, 49(1): 233-240.
[9] LIN Zhen-xian, ZHANG Meng-kai, WU Cheng-mao, ZHENG Xing-ning. Face Image Inpainting with Generative Adversarial Network [J]. Computer Science, 2021, 48(9): 174-180.
[10] XU Tao, TIAN Chong-yang, LIU Cai-hua. Deep Learning for Abnormal Crowd Behavior Detection:A Review [J]. Computer Science, 2021, 48(9): 125-134.
[11] PAN Xiao-qin, LU Tian-liang, DU Yan-hui, TONG Xin. Overview of Speech Synthesis and Voice Conversion Technology Based on Deep Learning [J]. Computer Science, 2021, 48(8): 200-208.
[12] WANG Jian-ming, LI Xiang-feng, YE Lei, ZUO Dun-wen, ZHANG Li-ping. Medical Image Deblur Using Generative Adversarial Networks with Channel Attention [J]. Computer Science, 2021, 48(6A): 101-106.
[13] YE Hong-liang, ZHU Wan-ning, HONG Lei. Music Style Transfer Method with Human Voice Based on CQT and Mel-spectrum [J]. Computer Science, 2021, 48(6A): 326-330.
[14] XU Yi-fei, XIONG Shu-hua, SUN Wei-heng, HE Xiao-hai, CHEN Hong-gang. HEVC Post-processing Algorithm Based on Non-local Low-rank and Adaptive Quantization Constraint Prior [J]. Computer Science, 2021, 48(5): 155-162.
[15] HU Yu-jie, CHANG Jian-hui, ZHANG Jian. Image Synthesis with Semantic Region Style Constraint [J]. Computer Science, 2021, 48(2): 134-141.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!