提交 39b91123 编写于 作者: C Cao Ying 提交者: GitHub

Merge pull request #2161 from luotao1/memory

add assert when is_seq=True, there must be a bootLayer in the network
...@@ -2320,6 +2320,9 @@ def Memory(name, ...@@ -2320,6 +2320,9 @@ def Memory(name,
memory_name = name + "+delay1" memory_name = name + "+delay1"
agent_name = memory_name agent_name = memory_name
if is_sequence: if is_sequence:
config_assert(
boot_layer is not None,
"there must be boot_layer in network when is_sequence = True")
agent_layer = SequenceAgentLayer(agent_name, size) agent_layer = SequenceAgentLayer(agent_name, size)
else: else:
agent_layer = AgentLayer(agent_name, size) agent_layer = AgentLayer(agent_name, size)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册