Skip to content

Commit

Permalink
avoid global pooling in mkldnn.
Browse files Browse the repository at this point in the history
There is a bug in global pooling in mkldnn.
  • Loading branch information
zheng-da committed Feb 2, 2018
1 parent b48346a commit f6efd34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/operator/nn/mkldnn/mkldnn_pooling-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ class MKLDNNPoolingFwd {
inline bool SupportMKLDNNPooling(const PoolingParam &param) {
return param.kernel.ndim() == 2 &&
(param.pool_type == pool_enum::kMaxPooling ||
param.pool_type == pool_enum::kAvgPooling);
param.pool_type == pool_enum::kAvgPooling)
// This is a temporary fix. There is a bug in global pooling of MKLDNN.
&& !param.global_pool;
}

inline bool SupportMKLDNNPooling(const PoolingParam &param,
Expand Down

0 comments on commit f6efd34

Please sign in to comment.