Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Fix bug introduced in batch_norm
Browse files Browse the repository at this point in the history
  • Loading branch information
larroy committed Apr 17, 2019
1 parent 20c4a1a commit 9c74556
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/operator/nn/batch_norm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,8 @@ std::vector<nnvm::NodeEntry> BatchNormGrad(const nnvm::NodePtr& n,
const std::vector<nnvm::NodeEntry>& ograds) {
std::vector<nnvm::NodeEntry> out_data(n->num_outputs());
out_data.reserve(n->num_outputs());
for (size_t i = 0; i < out_data.size(); ++i) {
for (size_t i = 0; i < n->num_outputs(); ++i)
out_data.emplace_back(n, i, 0);
}
std::vector<nnvm::NodeEntry> heads;
heads.reserve(8);
heads.emplace_back(ograds[0]);
Expand Down

0 comments on commit 9c74556

Please sign in to comment.