BinaryNet

作者: 王子冠 | 来源:发表于2018-07-20 16:45 被阅读0次

    Deterministic vs Stochastic Binarization


    确定型二值化 随机型二值化

    由于硬件产生概率较难,因此使用确定型二值化

    Gradient Computation and Accumulation


    the real-valued  gradients  of  the  weights  are  accumulated  in real-valued  variables

    SGD随机梯度下降,在梯度方向走小和随机的方向,噪声被多步平均,因此保持一定精度

    Propagating Gradients Through Discretization


    二值化近似求导,在绝对值不超过1的情况下为1,其余为0:

    训练过程


    前向传播和反向传播 更新训练参数

    BatchNorm


    用移位操作估计,加速BatchNorm

    Shift based Adam


    运行时


    第一层用8位像素值计算,其他用二值化计算,Xnor位操作

    Cifar-10数据集


    Xnor操作


    深度学习中最多的是乘加操作,BNN中可以用Xnor操作加速

    相关文章

      网友评论

          本文标题:BinaryNet

          本文链接:https://www.haomeiwen.com/subject/mdofmftx.html