Skip to content

Commit

Permalink
Remove BN debug.
Browse files Browse the repository at this point in the history
  • Loading branch information
zheng-da committed Jan 17, 2018
1 parent 6cc229f commit ba474be
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ ifeq ($(USE_MKLDNN), 1)
LDFLAGS += -L$(MKLDNNROOT)/lib -lmkldnn -Wl,-rpath,'$${ORIGIN}'
endif

ifeq ($(BN_DEBUG), 1)
CFLAGS += -DMXNET_BN_DEBUG=1
endif

ifeq ($(USE_OPERATOR_TUNING), 1)
CFLAGS += -DMXNET_USE_OPERATOR_TUNING=1
endif
Expand Down
17 changes: 0 additions & 17 deletions src/operator/nn/batch_norm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -382,23 +382,6 @@ static bool BatchNormType(const nnvm::NodeAttrs& attrs,
return true;
}

static inline bool similar_array(const mxnet::NDArray &arr1,
const mxnet::NDArray &arr2,
float tol) {
float *data1 = reinterpret_cast<float *>(arr1.data().dptr_);
float *data2 = reinterpret_cast<float *>(arr2.data().dptr_);
if (arr1.shape().Size() != arr2.shape().Size())
return false;
for (size_t i = 0; i < arr1.shape().Size(); i++) {
if (std::abs(data1[i] - data2[i]) > tol) {
// printf("similar_array: %.8f, %.8f \n", data1[i], data2[i]);
return false;
}
}
std::cout << "similar_array: passed all check, tol=" << tol << std::endl;
return true;
}

#if MXNET_USE_MKLDNN == 1
static inline bool SupportMKLDNNBN(const NDArray &input, const BatchNormParam &param) {
TShape shape = input.shape();
Expand Down

0 comments on commit ba474be

Please sign in to comment.