From 9a577f2e415d4ee8ee5c246a02ca24d75d94264e Mon Sep 17 00:00:00 2001 From: Youwei Song Date: Mon, 2 Sep 2019 19:38:28 +0800 Subject: [PATCH] fix batchnorm api param: data_layout (#19524) * fix batchnorm api param: data_layout * fix batchnorm data_layout param; test=develop --- python/paddle/fluid/dygraph/nn.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/paddle/fluid/dygraph/nn.py b/python/paddle/fluid/dygraph/nn.py index 7dbdc492d4..f64ced83b3 100644 --- a/python/paddle/fluid/dygraph/nn.py +++ b/python/paddle/fluid/dygraph/nn.py @@ -1133,6 +1133,7 @@ class BatchNorm(layers.Layer): self._variance.stop_gradient = True self._in_place = in_place + self._data_layout = data_layout self._momentum = momentum self._epsilon = epsilon self._is_test = is_test @@ -1177,6 +1178,7 @@ class BatchNorm(layers.Layer): "momentum": self._momentum, "epsilon": self._epsilon, "is_test": self._is_test, + "data_layout": self._data_layout, "use_mkldnn": False, "fuse_with_relu": self._fuse_with_relu, "use_global_stats": self._use_global_stats, -- GitLab