diff --git a/paddle/fluid/inference/api/api_anakin_engine.cc b/paddle/fluid/inference/api/api_anakin_engine.cc index 63d23321ab41eb9f26a4cd79f3ffa799e3795e72..6903fe26d1a4e27d7429dc4765e009f8e45f17d1 100644 --- a/paddle/fluid/inference/api/api_anakin_engine.cc +++ b/paddle/fluid/inference/api/api_anakin_engine.cc @@ -195,7 +195,7 @@ bool PaddleInferenceAnakinPredictor::RunImpl( << "'s type is not float"; } auto d_tensor_p = this->executor_p_->get_in(input.name); - auto net_shape = d_tensor_p->shape(); + auto net_shape = d_tensor_p->valid_shape(); if (net_shape.size() != input.shape.size()) { LOG(FATAL) << " input " << input.name << "'s shape size should be equal to that of net";