Skip to content

Commit 39b9112

Browse files
authored
Merge pull request #2161 from luotao1/memory
add assert when is_seq=True, there must be a bootLayer in the network
2 parents c2ebd1c + 23e00ba commit 39b9112

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/paddle/trainer/config_parser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,6 +2320,9 @@ def Memory(name,
23202320
memory_name = name + "+delay1"
23212321
agent_name = memory_name
23222322
if is_sequence:
2323+
config_assert(
2324+
boot_layer is not None,
2325+
"there must be boot_layer in network when is_sequence = True")
23232326
agent_layer = SequenceAgentLayer(agent_name, size)
23242327
else:
23252328
agent_layer = AgentLayer(agent_name, size)

0 commit comments

Comments
 (0)