cjolivier01 commented on a change in pull request #9677: Refactor operators and
add MKLDNN
URL: https://github.com/apache/incubator-mxnet/pull/9677#discussion_r168579525
##########
File path: tests/cpp/operator/batchnorm_test.cc
##########
@@ -901,36 +1054,29 @@ MSHADOW_REAL_TYPE_SWITCH_EX(
}
#endif // _WIN32
-/**
- * Backward tests (generally include forward tests as well)
- */
-
-template<typename DType, typename AccReal>
-struct BothInfo {
- test::op::OpInfo<mxnet::op::BatchNormV1Prop, BNOperatorExecutor<DType,
AccReal>> info_v1_;
- test::op::OpInfo<mxnet::op::BatchNormProp, BNOperatorExecutor<DType,
AccReal>> info_;
-};
-
-TEST(BATCH_NORM, TestBackward2D_Simple) {
- MSHADOW_REAL_TYPE_SWITCH_EX(
- mshadow::kFloat32, DType, AccReal,
- {
- const TShape inputShape({1, 1, 2, 1});
- test::op::OpInfoPair<
- mxnet::op::BatchNormV1Prop,
- mxnet::op::BatchNormProp, BNOperatorExecutor<DType, AccReal>> bi =
- testForwardAndBackward<
- mxnet::op::BatchNormV1Prop, mxnet::op::BatchNormProp,
BNOperatorExecutor<DType, AccReal>>(
- false, inputShape, blank_kwargs); // Keep it simple
- });
+inline std::ostream& operator << (std::ostream& os, const test::op::kwargs_t&
kwargs) {
+ if (!kwargs.empty()) {
+ os << "[";
+ size_t count = 0;
+ for (const auto &item : kwargs) {
+ if (count++) {
+ os << ", ";
+ }
+ os << item.first << "=" << item.second;
+ }
+ os << "]";
+ }
+ return os;
}
+#if 0
Review comment:
Sometimes GPU version seems to not write its output
----------------------------------------------------------------
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