From 942d7cf7ef0e817f3f77cdfbbfb684435554f407 Mon Sep 17 00:00:00 2001 From: shippingwang Date: Tue, 25 Dec 2018 11:46:19 +0000 Subject: [PATCH] Modify python interface, test=develop --- python/paddle/fluid/layers/nn.py | 2 +- python/paddle/fluid/tests/unittests/test_layers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index e654047df..7f7086641 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -9359,7 +9359,7 @@ def shuffle_channel(x, group=1, name=None): helper = LayerHelper("shuffle_channel", **locals()) out = helper.create_variable_for_type_inference( - dtype=helper.input_dtype('x')) + dtype=helper.input_dtype('X')) if not isinstance(group, int): raise TypeError("group must be int type") diff --git a/python/paddle/fluid/tests/unittests/test_layers.py b/python/paddle/fluid/tests/unittests/test_layers.py index bc4005122..daf4a9c82 100644 --- a/python/paddle/fluid/tests/unittests/test_layers.py +++ b/python/paddle/fluid/tests/unittests/test_layers.py @@ -1018,7 +1018,7 @@ class TestBook(unittest.TestCase): def test_shuffle_channel(self): program = Program() with program_guard(program): - x = layers.data(name="x", shape=[10, 16, 4, 4], dtype="float32") + x = layers.data(name="X", shape=[10, 16, 4, 4], dtype="float32") out = layers.shuffle_channel(x, group=2) self.assertIsNotNone(out) print(str(program)) -- GitLab