Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

impracticable in SyncLastestModel(void) function #140

Open
Janvril opened this issue May 12, 2015 · 3 comments
Open

impracticable in SyncLastestModel(void) function #140

Janvril opened this issue May 12, 2015 · 3 comments

Comments

@Janvril
Copy link

Janvril commented May 12, 2015

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)

@tqchen
Copy link
Member

tqchen commented May 12, 2015

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

Thanks

@Janvril
Copy link
Author

Janvril commented May 23, 2015

have opened a PR on this, #143

@winstywang
Copy link
Contributor

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 {}.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants