Skip to content

Conversation

@reyoung
Copy link
Collaborator

@reyoung reyoung commented Jan 10, 2018

Fix #7382

@reyoung reyoung force-pushed the feature/refine_get_places_op branch from 0fd0949 to 4059c9c Compare January 10, 2018 05:18
def get_places(device_count=None, device_type=None):
helper = LayerHelper('get_places', **locals())
out_places = helper.create_variable(name=unique_name(helper.name + ".out"))
attrs = dict()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do not set device_count and device_type if the user does not specify them.

Because C++ side will set the default value. Do not set default value twice, it makes code harder to maintain.

Copy link

@tonyyang-svail tonyyang-svail left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@reyoung reyoung merged commit 6cff3c9 into PaddlePaddle:develop Jan 10, 2018
@reyoung reyoung deleted the feature/refine_get_places_op branch January 22, 2018 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants