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 Adadelta optimizer #644

Merged
merged 1 commit into from Mar 22, 2016
Merged

Add Adadelta optimizer #644

merged 1 commit into from Mar 22, 2016

Conversation

Mistobaan
Copy link
Contributor

This is my attempt at #516 . Looking for some early feedback as is my first attempt.

@wchan
Copy link

wchan commented Jan 2, 2016

missing the GPU impl, did you forget to git add the file? cause the code references it but the file is missing ; )

also, I think a few lines are over 80 chars. but otherwise, LGTM.

@vrv
Copy link

vrv commented Jan 6, 2016

@zffchen78: when you get a chance can you take a look at this?

@tensorflow-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@zffchen78
Copy link
Contributor

LGTM

@Mistobaan
Copy link
Contributor Author

@vrv ok I will add the cuda part and do the edits !

@osdf
Copy link

osdf commented Jan 8, 2016

Two suggestions:

  • could you add a learning rate parameter lr? The original publication does not have it, but flexibility here is a good thing.
  • could you rename decay_rate to rho, following the paper and the rmsprop impl in the same file?

I think there is a mistake:
https://github.com/Mistobaan/tensorflow/blob/7a262ee6467c909cae723e0de5fb87a2a7e9a664/tensorflow/core/kernels/training_ops.cc#L53
This line either should have accum = ... (instead of +=) or follow the respective line in the rmsprop implementation further down (https://github.com/Mistobaan/tensorflow/blob/7a262ee6467c909cae723e0de5fb87a2a7e9a664/tensorflow/core/kernels/training_ops.cc#L133).

@wchan
Copy link

wchan commented Jan 16, 2016

FYI, there's a couple of bugs, namely the += shoulda been =

my impl is here (GPU included + separate lr included + sparse):
https://github.com/wchan/tensorflow/blob/master/tensorflow/core/kernels/training_ops.cc

@zffchen78
Copy link
Contributor

Hi, mistobaan, please let us know how you plan to proceed on this? I can see the following work items:

  1. address the accum issue raised by osdf and wchan. I do not have background to judge whether it's a bug or its your design choice. I can only review the implementation matches the specification, where your specification says accum +=; whether that matches the intended algorithm. It's up to you three to judge;
  2. whether to add lr option. It's also up to you and others to discuss and agree on something.

1 & 2 must be settled before we can add this op since it affects the op's interface / specification and will be hard to fix later.

  1. gpu support and test;
  2. sparse support and test;

You can get 1&2 done and merged first; and collaborate w/ others to get 3&4 done or you can incrementally get them done later.

@Mistobaan
Copy link
Contributor Author

Hi!
I am working on a patch that has all the above suggestions and the gpu code
from william chen

On Saturday, January 16, 2016, zffchen78 notifications@github.com wrote:

Hi, mistobaan, please let us know how you plan to proceed on this? I can
see the following work items:

  1. address the accum issue raised by osdf and wchan. I do not have
    background to judge whether it's a bug or its your design choice. I can
    only review the implementation matches the specification, where your
    specification says accum +=; whether that matches the intended algorithm.
    It's up to you three to judge;
  2. whether to add lr option. It's also up to you and others to discuss and
    agree on something.

1 & 2 must be settled before we can add this op since it affects the op's
interface / specification and will be hard to fix later.

  1. gpu support and test;
  2. sparse support and test;

You can get 1&2 done and merged first; and collaborate w/ others to get
3&4 done or you can incrementally get them done later.


Reply to this email directly or view it on GitHub
#644 (comment)
.

LinkedIn: http://linkedin.com/in/fmilo
Twitter: @fabmilo

Github: http://github.com/Mistobaan/

Simplicity, consistency, and repetition - that's how you get through. (Jack
Welch)
Perfection must be reached by degrees; she requires the slow hand of time
(Voltaire)
The best way to predict the future is to invent it (Alan Kay)

@Mistobaan Mistobaan force-pushed the master branch 3 times, most recently from 18dfed6 to 16a7c89 Compare January 20, 2016 23:39
@vrv
Copy link

vrv commented Feb 1, 2016

@Mistobaan: any updates?

@Mistobaan
Copy link
Contributor Author

@vrv I think the operation themselves are up to date and correct. I was not able to create a solid testing for GPU as I don't have a supported GPU environment at the moment. I just rebased the patch.

@vrv
Copy link

vrv commented Feb 1, 2016

Ok, we'll probably soon have GPU testing, right @martinwicke ? :). Then we can try pulling this in.

@vrv
Copy link

vrv commented Feb 16, 2016

@tensorflow-jenkins: test this please

@tensorflow-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@vrv
Copy link

vrv commented Feb 16, 2016

tensorflow/core/kernels/training_ops.cc:338:8: error: template-id 'operator()<>' for 'void tensorflow::functor::ApplyAdadelta<Eigen::GpuDevice, double>::operator()(const GPUDevice&, tensorflow::TTypes<double, 1, long int>::Flat, tensorflow::TTypes<double, 1, long int>::Flat, tensorflow::TTypes<double, 1, long int>::Flat, tensorflow::TTypes<double, 1, long int>::ConstScalar, tensorflow::TTypes<double, 1, long int>::ConstScalar, tensorflow::TTypes<double, 1, long int>::ConstScalar, tensorflow::TTypes<double, 1, long int>::ConstFlat)' does not match any template declaration
void ApplyAdadelta<GPUDevice, T>::operator()(
^
tensorflow/core/kernels/training_ops.cc:348:1: note: in expansion of macro 'DECLARE_GPU_SPEC'
DECLARE_GPU_SPEC(double);
^
tensorflow/core/kernels/training_ops.cc:345:41: note: saw 1 'template<>', need 2 for specializing a member function template
typename TTypes::ConstFlat grad);
^
tensorflow/core/kernels/training_ops.cc:348:1: note: in expansion of macro 'DECLARE_GPU_SPEC'
DECLARE_GPU_SPEC(double);
^
tensorflow/core/kernels/training_ops.cc:352:17: error: expected constructor, destructor, or type conversion before '(' token
REGISTER_KERNELS(GPU, float);
^
tensorflow/core/kernels/training_ops.cc:353:17: error: expected constructor, destructor, or type conversion before '(' token
REGISTER_KERNELS(GPU, double);

@vrv
Copy link

vrv commented Feb 18, 2016

(ping this thread when this is ready -- it looks like you added a commit but don't know if it's ready)

@bernardopires
Copy link
Contributor

@Mistobaan, any update on this? I'm also really interested in trying AdaDelta. Thanks!

# limitations under the License.
# ==============================================================================

"""Tests for Momentum."""

Choose a reason for hiding this comment

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

Docstring references Momentum instead of AdaDelta.

@Mistobaan Mistobaan force-pushed the master branch 2 times, most recently from 7753631 to ad01e6f Compare March 14, 2016 04:21
@Mistobaan Mistobaan changed the title [WIP] Add Adadelta optimizer Add Adadelta optimizer Mar 14, 2016
@vrv
Copy link

vrv commented Mar 17, 2016

@tensorflow-jenkins: test this please

@vrv
Copy link

vrv commented Mar 17, 2016

@Mistobaan: I think this looks good pending the GPU tests finishing -- the only other thing I think we need is for you to run

bazel-bin/tensorflow/core/ops/compat/update_ops tensorflow/core/ops

and add that updated file to your commit for tracking backwards compatibility.

@Mistobaan
Copy link
Contributor Author

@vrv I run and added the modified files as you requested.

@vrv
Copy link

vrv commented Mar 21, 2016

@tensorflow-jenkins: test this please

@vrv
Copy link

vrv commented Mar 21, 2016

Looks like nothing built -- can you double check and verify that your commit compiles and passes in at least one config?

@Mistobaan
Copy link
Contributor Author

@vrv let's try again I ran the updated command on an old branch and force pushed

@vrv
Copy link

vrv commented Mar 21, 2016

@tensorflow-jenkins: test this please

vrv pushed a commit that referenced this pull request Mar 22, 2016
@vrv vrv merged commit a71e1ff into tensorflow:master Mar 22, 2016
darkbuck pushed a commit to darkbuck/tensorflow that referenced this pull request Jan 23, 2020
…axPotentialBlockSize

enable hipOccupancyMaxPotentialBlockSize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants