diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index e654047df66f046441068841bfa3bb09b383c22e..7f7086641ac53cd55403d550f8b213d2854db48f 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 bc4005122e369dd53c8f874884b09bd86c1ce9fb..daf4a9c824aa8c148880e345846c63c022f27e21 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))