diff --git a/mindspore/ccsrc/plugin/device/ascend/optimizer/ge/avg_pool_grad_for_ge.cc b/mindspore/ccsrc/plugin/device/ascend/optimizer/ge/avg_pool_grad_for_ge.cc index 94779a59841..6203465fce0 100644 --- a/mindspore/ccsrc/plugin/device/ascend/optimizer/ge/avg_pool_grad_for_ge.cc +++ b/mindspore/ccsrc/plugin/device/ascend/optimizer/ge/avg_pool_grad_for_ge.cc @@ -60,7 +60,7 @@ const AnfNodePtr AvgPoolGradForGE::Process(const FuncGraphPtr &graph, const AnfN std::string pad_mode; if (pad_mode_type == TypeId::kNumberTypeInt64) { auto pad_value = GetValue(pad_mode_value); - pad_mode = pad_value != 0 ? "SAME" : "VALID"; + pad_mode = pad_value == 1 ? "SAME" : "VALID"; } else { pad_mode = GetValue(pad_mode_value); }