ykim362 commented on a change in pull request #7303: add
backward(is_train=False) and always mode for dropout
URL: https://github.com/apache/incubator-mxnet/pull/7303#discussion_r131047511
##########
File path: src/operator/dropout-inl.h
##########
@@ -96,7 +104,7 @@ class DropoutOp : public Operator {
bernoulli_generate(count, this->pkeep_, maskptr);
#pragma omp parallel for
for (int i = 0; i < count; ++i) {
- outptr[i] = dataptr[i] * maskptr[i];
+ outptr[i] = dataptr[i] * maskptr[i] * (1.0f / pkeep_);
Review comment:
@piiswrong Got it, Thanks! I am looking into the code again to make sure
other things are correct.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services