From 2916caa2c488df6a11fa74c825eda95bb86aa2cb Mon Sep 17 00:00:00 2001
From: Huihuang Zheng <zhhy409923957@163.com>
Date: Fri, 30 Aug 2019 14:39:47 +0800
Subject: [PATCH] Change ugly PADDLE_ENFORCE_EQ in recurrent_op.cc (#19470)

test=develop
---
 paddle/fluid/operators/recurrent_op.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/paddle/fluid/operators/recurrent_op.cc b/paddle/fluid/operators/recurrent_op.cc
index efc3ba056f1..43c724e91b2 100644
--- a/paddle/fluid/operators/recurrent_op.cc
+++ b/paddle/fluid/operators/recurrent_op.cc
@@ -121,7 +121,7 @@ int64_t RecurrentBase::GetSequenceLength(const framework::Scope &scope) const {
   // Dim format SEQ_LEN, BATCH_SIZE, ...
   int64_t seq_len = -1;
   auto &all_inputs = Inputs(kInputs);
-  PADDLE_ENFORCE_EQ(!all_inputs.empty(), true);
+  PADDLE_ENFORCE_EQ(all_inputs.empty(), false);
   for (auto &iname : all_inputs) {
     auto *var = scope.FindVar(iname);
     PADDLE_ENFORCE_NOT_NULL(var);
-- 
GitLab