A Das
A Das

Reputation: 847

SGD with momentum in TensorFlow

In Caffe, the SGD solver has a momentum parameter (link). In TensorFlow, I see that tf.train.GradientDescentOptimizer does not have an explicit momentum parameter. However, I can see that there is tf.train.MomentumOptimizer optimizer. Is it the equivalent of Caffe SGD with momentum optimizer?

Upvotes: 14

Views: 13196

Answers (2)

Alp Aribal
Alp Aribal

Reputation: 370

tf.keras.optimizers.SGD has a momentum parameter. Applying a Nesterov momentum is also possible by using nesterov=True.

Upvotes: 1

nessuno
nessuno

Reputation: 27042

Yes it is. tf.train.MomentumOptimizer = SGD + momentum

Upvotes: 19

Related Questions