cxxnet icon indicating copy to clipboard operation
cxxnet copied to clipboard

impracticable in SyncLastestModel(void) function

Open Janvril opened this issue 10 years ago • 3 comments

the 187 line in cxxnet_main.cpp os << name_model_dir << '/' << std::setfill('0')<< std::setw(4) << s_counter++ << ".model"; only if the last training task set parameter "save_model" as 1, then it can sync from the latest model, otherwise it cannot find the model (must specify "start_counter" ), and the error message is to set the parameter "model_in", but "model_in" parameter is invalid here, it cannot sync from the specified model.

I think it should be: to check "model_in" whether is specified or not, if not specified then sync from the latest model, and s_counter += save_period; (instead of "s_counter++" in 187)

Janvril avatar May 12 '15 02:05 Janvril

Oh, yes.. Can you open a PR on this ?

Thanks

tqchen avatar May 12 '15 17:05 tqchen

have opened a PR on this, #143

Janvril avatar May 23 '15 00:05 Janvril

Hi, Thanks for the contribution. Before merge, please fix your coding style in the PR, i.e. 1. using two spaces instead of tab for indentation, 2. the location of { }. 3. All if should be surrounded by {}.

winstywang avatar May 23 '15 01:05 winstywang