提交 30aded19 编写于 作者: Q qiaolongfei

fix None problem

上级 ea8013e4
......@@ -325,10 +325,10 @@ class RecurrentLayerInput(WithExtraParent):
self.__parents__ = []
else:
self.__parents__ = parent_layers.values()[0]
name = self.__parents__[index].name if index >= 0 else None
self.__recurrent_name__ = recurrent_name
name = self.__parents__[index].name if index >= 0 else self.context_name()
super(RecurrentLayerInput, self).__init__(
name=name, parent_layers=parent_layers)
self.__recurrent_name__ = recurrent_name
def context_name(self):
return self.__recurrent_name__ + ".begin"
......@@ -340,10 +340,6 @@ class RecurrentLayerInput(WithExtraParent):
in_links=map(lambda x: x.name, self.__parents__))
return self
def use_context_name(self):
return True
class RecurrentLayerOutput(Layer):
def __init__(self, recurrent_name, index, parent_layers):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册