Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I choose an optimizer for my tensorflow model?

Tags:

tensorflow

Tensorflow seems to have a large collection of optimizers, is there any high level guideline (or review paper) on which one is best adapted to specific classes of loss functions ?

like image 968
Luca Fiaschi Avatar asked May 13 '16 16:05

Luca Fiaschi


People also ask

Which Optimizer is best for CNN?

The Adam optimizer had the best accuracy of 99.2% in enhancing the CNN ability in classification and segmentation.

How do I create a custom Optimizer in Tensorflow?

For most (custom) optimizer implementations, the method apply_gradients() needs to be adapted. This method relies on the (new) Optimizer (class), which we will create, to implement the following methods: _create_slots(), _prepare(), _apply_dense(), and _apply_sparse().

What are the different optimizers in Tensorflow?

Tensorflow Keras Optimizers Classes:Adagrad: Optimizer that implements the Adagrad algorithm. Adam: Optimizer that implements the Adam algorithm. Adamax: Optimizer that implements the Adamax algorithm. Ftrl: Optimizer that implements the FTRL algorithm.


1 Answers

It depends on your datasets and NN models, but generally, I would start with Adam. Figure 2 in this paper (http://arxiv.org/abs/1412.6980) shows Adam works well.

enter image description here

Also, you can see a very nice animation from http://www.denizyuret.com/2015/03/alec-radfords-animations-for.html.

enter image description here

like image 64
Sung Kim Avatar answered Oct 24 '22 06:10

Sung Kim