Change ugly PADDLE_ENFORCE_EQ in recurrent_op.cc (#19470)

test=develop
fix_crf_doc
Huihuang Zheng 6 years ago committed by GitHub
parent 9dde564097
commit 2916caa2c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);

Loading…
Cancel
Save