From 8aa095ca4fd09563654ff287799340b31771e282 Mon Sep 17 00:00:00 2001 From: hong <43953930+phlrain@users.noreply.github.com> Date: Fri, 24 Apr 2020 10:06:02 +0800 Subject: [PATCH] Pick fix warpctx in dygraph mode (#24120) * change compare op fore_cpu true to false; test=develop * pick fix warpctc bug in dygrpah mode; test=develop --- python/paddle/fluid/layers/loss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/loss.py b/python/paddle/fluid/layers/loss.py index dc61aa1f4cf..7c83b0db24d 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] -- GitLab