diff --git a/python/paddle/fluid/layers/loss.py b/python/paddle/fluid/layers/loss.py index dc61aa1f4cf4cd9fe2333450cfe1066799db613a..7c83b0db24df9da23eacb69b21e6feed8be15e23 100644 --- a/python/paddle/fluid/layers/loss.py +++ b/python/paddle/fluid/layers/loss.py @@ -611,7 +611,7 @@ def warpctc(input, """ helper = LayerHelper('warpctc', **locals()) this_inputs = {'Logits': [input], 'Label': [label]} - if input_length and label_length: + if input_length is not None and label_length is not None: this_inputs['LogitsLength'] = [input_length] this_inputs['LabelLength'] = [label_length]