wkcn commented on a change in pull request #18492:
URL: https://github.com/apache/incubator-mxnet/pull/18492#discussion_r436185062
##########
File path: src/operator/nn/cudnn/cudnn_batch_norm-inl.h
##########
@@ -228,7 +228,7 @@ class CuDNNBatchNormOp {
&a,
&b,
&a,
- req[cudnnbatchnorm::kGamma] == kWriteTo ? &b: &b_add,
+ req[cudnnbatchnorm::kGamma] == kAddTo ? &b_add : &b,
Review comment:
`gamma.grad_req = kAddTo` is not supported in [Naive CPU
Implementation](https://github.com/apache/incubator-mxnet/blob/master/src/operator/nn/batch_norm.cc#L304),
[Naive GPU
one](https://github.com/apache/incubator-mxnet/blob/master/src/operator/nn/batch_norm.cu#L383)
and [MKLDNN
one](https://github.com/apache/incubator-mxnet/blob/master/src/operator/nn/mkldnn/mkldnn_batch_norm-inl.h#L419).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]