diff --git a/python/paddle/fluid/layers/loss.py b/python/paddle/fluid/layers/loss.py index 767f5799a42b74195897b9b5e045fabff219bf78..0e6dcf39bcae5f8d707d26972b3700fad858c9fb 100644 --- a/python/paddle/fluid/layers/loss.py +++ b/python/paddle/fluid/layers/loss.py @@ -617,7 +617,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]