From 6a873f505f77b3fb183f791358413c27afa5b922 Mon Sep 17 00:00:00 2001 From: Haonan Date: Tue, 6 Sep 2016 11:44:57 -0700 Subject: [PATCH] fix the layer name error when stacking RecurrentGroups * the last layer in the stack already has all the suffixes --- python/paddle/trainer/config_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/trainer/config_parser.py b/python/paddle/trainer/config_parser.py index 53d8bb98f09..b26a63e7f3c 100644 --- a/python/paddle/trainer/config_parser.py +++ b/python/paddle/trainer/config_parser.py @@ -262,8 +262,8 @@ def SubModelEnd(name = None): def MakeLayerNameInParentSubmodel(name): suffix = "" - for submodel in g_submodel_stack[1:]: - suffix = "@" + submodel.name + suffix + if len(g_submodel_stack) > 1: + suffix = "@" + g_submodel_stack[-1].name return name + suffix def GetLayerBaseName(name): -- GitLab