Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add assert when is_seq=True, there must be a bootLayer in the network #2161

Merged
merged 2 commits into from
May 17, 2017
Merged

Conversation

luotao1
Copy link
Contributor

@luotao1 luotao1 commented May 16, 2017

fix #2142

@wangkuiyi wangkuiyi changed the title add assert when is_seq=True, there must be bootLayer add assert when is_seq=True, there must be a bootLayer in the network May 16, 2017
Copy link
Contributor

@lcy-seso lcy-seso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a small modification.

@@ -2916,6 +2916,8 @@ def memory(name,
boot_bias = ParamAttr.to_bias(boot_bias)

assert boot_layer is None or isinstance(boot_layer, LayerOutput)
if is_seq == True:
assert isinstance(boot_layer, LayerOutput)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是可以直接改在 config_parser.py里面,这样不论是使用v0,v1,v2的用户都能报错误。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@lcy-seso lcy-seso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lcy-seso lcy-seso merged commit 39b9112 into PaddlePaddle:develop May 17, 2017
@luotao1 luotao1 deleted the memory branch June 5, 2017 04:33
heavengate pushed a commit to heavengate/Paddle that referenced this pull request Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mandatory boot_layer argument in paddle.layer.memory if is_seq set True.
2 participants