forget to set adam momentum2 in solver.prototxt

42 views
Skip to first unread message

Shrui Liu

unread,
Sep 1, 2017, 9:10:49 AM9/1/17
to Caffe Users

I wonder what the momentum2 will be in this situation?
the default? but where can i find that?


I guess it is seted here, but i am not sure
https://github.com/BVLC/caffe/blob/master/src/caffe/test/test_gradient_based_solver.cpp#L328

Przemek D

unread,
Sep 1, 2017, 9:30:04 AM9/1/17
to Caffe Users
The source file you linked is a unit test - it has nothing to do with actually running Caffe.

If you want to know default value of any parameter, you have to look in the caffe.proto file instead. In the link you will directly find the section on SGD solvers, particularly the momentum2 param of the Adam solver (default value is 0.999).

Shrui Liu

unread,
Sep 1, 2017, 9:27:40 PM9/1/17
to Caffe Users
Thanks so much! 
If I forgot to set momentum2 in solver.ptototxt, then it would be the default? 

Actually, I have noticed the momentum2 in caffe.proto:
optional float momentum2 = 39 [default = 0.999];
but I don't understand what's meaning of 39.

在 2017年9月1日星期五 UTC+8下午9:30:04,Przemek D写道:
Message has been deleted

Przemek D

unread,
Sep 7, 2017, 3:49:50 AM9/7/17
to Caffe Users
Yes, if you don't explicitly set a value of an optional parameter, the default value will be assumed.
Regarding the 39, it's just an enumerating integer and you don't have to bother with it unless you want to make your own solver or layer. Think of it as a part of google's Protocol Buffer syntax (caffe.proto is not a source file but a protobuf which is compiled into source code).


W dniu piątek, 1 września 2017 15:10:49 UTC+2 użytkownik Shrui Liu napisał:

Shrui Liu

unread,
Sep 7, 2017, 8:02:33 AM9/7/17
to Caffe Users
Perfect answer! Thanks again for your help!

在 2017年9月7日星期四 UTC+8下午3:49:50,Przemek D写道:
Reply all
Reply to author
Forward
0 new messages