From c3773664338a75c2980ceb77b25f75f564854fb7 Mon Sep 17 00:00:00 2001 From: mamingjie-China Date: Tue, 4 Aug 2020 14:56:58 +0800 Subject: [PATCH] update --- x2paddle/op_mapper/tf_op_mapper_nhwc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x2paddle/op_mapper/tf_op_mapper_nhwc.py b/x2paddle/op_mapper/tf_op_mapper_nhwc.py index 5e1a54b..81079df 100644 --- a/x2paddle/op_mapper/tf_op_mapper_nhwc.py +++ b/x2paddle/op_mapper/tf_op_mapper_nhwc.py @@ -220,7 +220,10 @@ class TFOpMapperNHWC(OpMapper): block_size = node.get_attr("block_size") data_format = node.get_attr("data_format").decode() - n, h, w, c = input.out_shapes[0] + if data_format == "NHWC": + n, h, w, c = input.out_shapes[0] + else: + n, c, h, w = input.out_shapes[0] input_name = input.name if data_format == "NHWC": -- GitLab