Skip to content

Commit

Permalink
Make helper shows the correct output value
Browse files Browse the repository at this point in the history
Change-Id: Ia5358f88129b5c2e2a2653b1d85c168b80d797b3
  • Loading branch information
reyoung committed Sep 3, 2016
1 parent 76a668c commit c5d1902
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions python/paddle/trainer_config_helpers/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1121,12 +1121,13 @@ def __dfs_travel__(layer,
logger.info(
"".join(["The input order is [", ", ".join(final_inputs), "]"])
)

if len(final_outputs) == 0:
final_outputs = map(lambda x: x.name, layers)

logger.info(
"".join(["The output order is [", ", ".join(final_outputs), "]"
]))

Inputs(*final_inputs)
if len(final_outputs) != 0:
Outputs(*final_outputs)
else:
Outputs(*map(lambda x: x.name, layers))
Outputs(*final_outputs)

0 comments on commit c5d1902

Please sign in to comment.