Skip to content

Conversation

@typhoonzero
Copy link
Contributor

Fix #10014

@typhoonzero typhoonzero requested review from Yancey0623 and jacquesqiao and removed request for jacquesqiao April 19, 2018 05:42
# blocks.
param_list = [pg[0] for pg in params_grads]
grad_list = [pg[1] for pg in params_grads]
param_list = []
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can use filter for the shorter code:

param_list = filter(lambda x[0] : type(x[0]) == parameter and x[0].trainable == True , params_grads)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, this way actually run 2 for loops and current implementation just run 1for loop

Copy link
Contributor

@Yancey0623 Yancey0623 left a comment

Choose a reason for hiding this comment

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

LGTM

@typhoonzero typhoonzero merged commit 879b7c5 into PaddlePaddle:develop Apr 19, 2018
@typhoonzero typhoonzero deleted the fix_not_trainable_transpiler branch April 19, 2018 11:55
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.

2 participants