diff --git a/x2paddle/op_mapper/tf_op_mapper.py b/x2paddle/op_mapper/tf_op_mapper.py index 73b0da50d797e2eb9fca0c724499e0ed4fdbf367..d9e565a115c17d518de9757540825d391dd1feee 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]