facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.95k forks source link

adam #1153

Open xshwen opened 7 years ago

xshwen commented 7 years ago

Where can I find a simple example of the use of adam?

mrharicot commented 7 years ago

Here is an example of using the optimizer interface: https://github.com/caffe2/caffe2/blob/master/caffe2/python/examples/resnet50_trainer.py#L289

You can just replace the sgd by adam: optimizer.build_adam(model, learning_rate)

Have a look at optimizer.py for more details.