From c67fd5671a11d1783ea91ffbd18589746cb6addf Mon Sep 17 00:00:00 2001 From: jiangjiajun Date: Mon, 16 Sep 2019 14:49:40 +0800 Subject: [PATCH] fix bug --- x2paddle/op_mapper/tf_op_mapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x2paddle/op_mapper/tf_op_mapper.py b/x2paddle/op_mapper/tf_op_mapper.py index 73b0da5..d9e565a 100644 --- a/x2paddle/op_mapper/tf_op_mapper.py +++ b/x2paddle/op_mapper/tf_op_mapper.py @@ -591,7 +591,7 @@ class TFOpMapper(OpMapper): # to change [192, -1]->[-1, 192], allways put -1 in the first dimension # optimization for Paddle-Lite in_shape = input.out_shapes[0] - if is_variable and in_shape.count(-1) < 1: + if not is_variable and in_shape.count(-1) < 1: total_size = 1 for i in range(len(in_shape)): total_size *= in_shape[i] -- GitLab