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 registry interface" #6449

Merged
merged 6 commits into from
Dec 13, 2017
Merged

Conversation

dzhwinter
Copy link
Contributor

fix #6448

typhoonzero
typhoonzero previously approved these changes Dec 11, 2017
Copy link
Contributor

@typhoonzero typhoonzero left a 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.

layer_registry('scale')
layer_registry('reshape')
layer_registry('transpose')
layer_registry('sigmoid_cross_entropy_with_logits')
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

from param_attr import ParamAttr
import contextlib

__all__ = [
'fc', 'data', 'cross_entropy', 'conv2d', 'pool2d', 'embedding', 'concat',
'StaticRNN', 'cast', 'sequence_conv', 'sequence_pool', 'sums', 'cos_sim',
'batch_norm', 'accuracy', 'split_lod_tensor', 'While'
]

Copy link
Collaborator

@reyoung reyoung Dec 11, 2017

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_)

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.

@dzhwinter dzhwinter merged commit 697facc into PaddlePaddle:develop Dec 13, 2017
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.

need deperated warning in Python API
3 participants