From 657cd06d34bd2af91e5b3cfb7c90adcdbcc7884b Mon Sep 17 00:00:00 2001 From: SunAhong1993 Date: Thu, 19 Nov 2020 20:31:18 +0800 Subject: [PATCH] fix the slice --- x2paddle/op_mapper/tf_op_mapper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x2paddle/op_mapper/tf_op_mapper.py b/x2paddle/op_mapper/tf_op_mapper.py index 82e2694..a2e8ec0 100644 --- a/x2paddle/op_mapper/tf_op_mapper.py +++ b/x2paddle/op_mapper/tf_op_mapper.py @@ -912,7 +912,9 @@ class TFOpMapper(OpMapper): # shape=shape) # inputs['shape'] = reshape_name -# inputs.pop('shape') + for i, s in enumerate(shape): + if s < 0: + shape[i] = 32767 program.add_layer( kernel="fluid.layers.slice", inputs=inputs, -- GitLab