-
Notifications
You must be signed in to change notification settings - Fork 614
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
Implementation of Conditional Gradient Optimizer #469
Conversation
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.
Could you rewrite the tests to be compatible with both graph and eager modes? Some of them seem to be graph only currently.
Could you update the PR after formatting as mentioned here. |
Hi @Squadrick! Thank you for giving me the link! It is really helpful. But I have some error on "clang-format" while running the "make code-format". So I just manually run the yapf to change the format. Wish that it can work. Thank you! |
Hi, pkan2, did you try: |
Seems that we forget to append a comma in the line end :-)
|
Hello @Squadrick and @facaiy! Thank you for your feedbacks! I think the reason for failing the GPU test is caused by similar issue in #347. I am trying to use the solution provided in the this issue into the "conditional_gradient_test.py" file to get rid of the issue of "tf.half" in "'ResourceScatterUpdate' OpKernel" for GPU device. And it seems that "tensorflow_addons.utils" does not have attribute of "'GpuSupportsHalfMatMulAndConv'" from the solution. So I will probably just delete this part and keep the rest from the solution. Thank you! Sincerely, Pengyu Kan |
Yeah, that sounds good. We'll update the test once #347 is resolved. Could you add a TODO regarding this in the code? |
Hi @Squadrick! Thank you so much for the review! I have updated the file with the suggested changes. But for the variable name "lamda", I still have not decided on what name to choose, as "lambda" is a reserved key word in python. I will think about this point. Thank you again! |
I have changed the variable name "lamda" into "Lambda". |
Sorry for the delay, @pkan2 . I'll take a look today. Thanks for ping me, Dheeraj :-) |
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.
If you annotate ConditionalGradientTest
with test_utils.run_all_in_graph_and_eager_modes
, you don't need to again separately annotate each test*
method with test_utils.run_in_graph_and_eager_modes
.
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.
Thank you, Pengyu! I'll take a full review tomorrow :-)
Args: | ||
learning_rate: A `Tensor` or a floating point value. | ||
The learning rate. | ||
Lambda: A `Tensor` or a floating point value. The constraint. |
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.
Can we use constraint here or other name? At least, lambda_
is accepted if we have no better choice :-)
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.
Thanks for the suggestion! It is just trying to keep the same letter used for expression in the formula by the paper. Can I choose "l_ambda" maybe? Otherwise, I can change into using "lambda_".
Thank you!
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.
Thanks for your contribution! We'll get this merged as soon as the test cases are done.
@Squadrick @facaiy Thank you a lot! |
Apologized that I'm busy this week than I expected. I'm fine to merge it if @Squadrick approved, and I'll recheck the PR later when I have time. 😄 thank all |
Hi @Squadrick @facaiy! I have changed the variable name of constraint into "lambda_". And I have updated the README file with adding co-contributor Vishnu Lokhande into it as maintainer too. Thank you! |
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.
Hello,
I have uploaded the implementation of Conditional Gradient optimizer into this directory. It is implementing the issue #468.
The contributors are Pengyu Kan and Vishnu sai rao suresh Lokhande, whose github name is lokhande-vishnu.
Sincerely,
Pengyu Kan