Browse Source

!11511 Fix GPU BiasAdd NHWC data format problem

From: @TFbunny
Reviewed-by: @tom__chen,@robingrosman
Signed-off-by: @robingrosman
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 4 years ago
parent
commit
fe3473c0cc
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/core/abstract/prim_nn.cc

+ 1
- 1
mindspore/core/abstract/prim_nn.cc View File

@@ -530,7 +530,7 @@ AbstractBasePtr InferImplBiasAdd(const AnalysisEnginePtr &, const PrimitivePtr &
ShapeVector x_min_shape = x->shape()->min_shape();
ShapeVector x_max_shape = x->shape()->max_shape();
std::set<std::string> available_data_format{"NCHW", "NHWC"};
auto data_format_ptr = primitive->GetAttr("data_format");
auto data_format_ptr = primitive->GetAttr("format");
std::string data_format = "NCHW";
if ((data_format_ptr != nullptr) && data_format_ptr->isa<StringImm>()) {
data_format = data_format_ptr->cast<StringImmPtr>()->value();


Loading…
Cancel
Save