-
Notifications
You must be signed in to change notification settings - Fork 5.9k
"add registry interface" #6449
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 registry interface" #6449
Conversation
typhoonzero
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and a minor comment.
python/paddle/v2/fluid/layers.py
Outdated
| layer_registry('scale') | ||
| layer_registry('reshape') | ||
| layer_registry('transpose') | ||
| layer_registry('sigmoid_cross_entropy_with_logits') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name should be register_layer, it's more meaningful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
| 'StaticRNN', 'cast', 'sequence_conv', 'sequence_pool', 'sums', 'cos_sim', | ||
| 'batch_norm', 'accuracy', 'split_lod_tensor', 'While' | ||
| ] | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can create an array here.
_layer_op_array_ = ['mean', 'mul', ...]
for _each_ in _layer_op_array_:
register_layer(_each_)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
fix #6448