Closed CheungBH closed 1 year ago
您好,您的邮件已收到,我会尽快查看。
参考google的论文,qat的时候最好fold bn,这样和推理才是一致的
感谢,我去看一下。 还有个问题就是,training的时候BN为什么要这样处理? https://github.com/Jermmy/pytorch-quantization-demo/blob/8dc1f8da75ad0ff3110eec57b96c846cd41d3462/module.py#L345 从345行到356行这
因为BN在Conv中是对输出feature的每个channel都算一个均值和方差,这个permute只是把channel换到第一维,方便对每个channel算均值和方差
那下面的这几句呢,这几句加上动量的目的是什么啊
这是BN更新均值方差的算法,可以参考下pytorch BN源码
这是BN更新均值方差的算法,可以参考下pytorch BN源码
谢谢,还有个问题哈。 https://github.com/Jermmy/pytorch-quantization-demo/blob/8dc1f8da75ad0ff3110eec57b96c846cd41d3462/module.py#L340 https://github.com/Jermmy/pytorch-quantization-demo/blob/8dc1f8da75ad0ff3110eec57b96c846cd41d3462/module.py#L367 这一个forward里包含两个F.conv的目的是什么
看一下我上面po的google论文图,有两个conv,第二个对应conv fold
看一下我上面po的google论文图,有两个conv,第二个对应conv fold
感谢。我基本明白了
如题。我看到你在训练的forward里面进行了BN folding。 https://github.com/Jermmy/pytorch-quantization-demo/blob/8dc1f8da75ad0ff3110eec57b96c846cd41d3462/module.py#L399 我想知道这么做的意图是什么。BN folding不是训完得到checkpoint才进行的么