diff --git a/paddle/fluid/framework/operator.cc b/paddle/fluid/framework/operator.cc index 266b5749c5dd6a93187368e619464e3de1076d98..cdac00739bc48648b41751e644a953d0d310ffbf 100644 --- a/paddle/fluid/framework/operator.cc +++ b/paddle/fluid/framework/operator.cc @@ -59,7 +59,7 @@ static DDim GetDims(const Scope& scope, const std::string& name, if (var->IsType()) { const LoDTensor& tensor = var->Get(); - if (UNLIKELY(tensor.IsInitialized())) { + if (UNLIKELY(!tensor.IsInitialized())) { return DDim({-1}); } return tensor.dims();