pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.71k stars 21.32k forks source link

Adam optimizer #645

Open sonalambwani opened 6 years ago

sonalambwani commented 6 years ago

Hi, How can I specify the network to use Adam Optimizer and it's params B1 and B2... in command line OR preferably set it up in the cfg file??

From the code it looks like Adam optimization is available.

Also, which optimization is used by default?

-Sonal

raytroop commented 6 years ago

you can check void parse_net_options(list *options, network *net) in parser.c in src directory. net->adam = option_find_int_quiet(options, "adam", 0); if(net->adam){ net->B1 = option_find_float(options, "B1", .9); net->B2 = option_find_float(options, "B2", .999); net->eps = option_find_float(options, "eps", .0000001); }

liyuanyaun commented 6 years ago

@raytroop @sonalambwani if i set "adam=1" in yolov3-voc.cfg, did i use adam Optimizer for the network? or maybe other way?

aluds123 commented 4 years ago

@liyuanyaun Can it work when you set "adam=1" in yolov3-voc.cfg ?