From 6c3cb86120dd4890112eaba2a508e5636b837a23 Mon Sep 17 00:00:00 2001 From: jiangjiajun Date: Sat, 28 Mar 2020 14:06:20 +0800 Subject: [PATCH] fix bug --- x2paddle/decoder/tf_decoder.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/x2paddle/decoder/tf_decoder.py b/x2paddle/decoder/tf_decoder.py index 97c5d48..089be82 100644 --- a/x2paddle/decoder/tf_decoder.py +++ b/x2paddle/decoder/tf_decoder.py @@ -341,9 +341,12 @@ class TFDecoder(object): need_define_shape = 2 if need_define_shape == 1: - shape = graph_node.out_shapes[0] - if len(shape) > 0 and shape.count(-1) < 2: - need_define_shape = 0 + try: + shape = graph_node.out_shapes[0] + if len(shape) > 0 and shape.count(-1) < 2: + need_define_shape = 0 + except: + pass if need_define_shape > 0: shape = None -- GitLab