diff --git a/paddle/fluid/inference/api/api_anakin_engine.cc b/paddle/fluid/inference/api/api_anakin_engine.cc index 4c51c239f6d4449795fa38665495ab260277c84d..cf5b53b51ccc257a30cc3e90335ed71f67c212a1 100644 --- a/paddle/fluid/inference/api/api_anakin_engine.cc +++ b/paddle/fluid/inference/api/api_anakin_engine.cc @@ -203,7 +203,8 @@ 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->valid_shape(); + // For backward compatibility. + auto net_shape = d_tensor_p->shape(); if (net_shape.size() != input.shape.size()) { LOG(FATAL) << " input " << input.name << "'s shape size should be equal to that of net";