diff --git a/python/liblinear.py b/python/liblinear.py index 80cfc54..5399d4d 100644 --- a/python/liblinear.py +++ b/python/liblinear.py @@ -240,8 +240,8 @@ def set_bias(self, bias): class parameter(Structure): - _names = ["solver_type", "eps", "C", "nr_thread", "nr_weight", "weight_label", "weight", "p", "init_sol"] - _types = [c_int, c_double, c_double, c_int, c_int, POINTER(c_int), POINTER(c_double), c_double, POINTER(c_double)] + _names = ["solver_type", "eps", "C", "nr_thread", "nr_weight", "weight_label", "weight", "p", "init_sol", "init_sol_size"] + _types = [c_int, c_double, c_double, c_int, c_int, POINTER(c_int), POINTER(c_double), c_double, POINTER(c_double), c_int] _fields_ = genFields(_names, _types) def __init__(self, options = None): diff --git a/train.c b/train.c index f3e484c..fbe9cc7 100644 --- a/train.c +++ b/train.c @@ -545,11 +545,6 @@ void read_problem(const char *filename) } } - - - - - double* read_old_weights(const char *filename, int * num_weights) { FILE *fp = fopen(filename,"r"); if(fp == NULL) @@ -577,7 +572,7 @@ double* read_old_weights(const char *filename, int * num_weights) { w[idx] = atof(line); idx++; } - printf("Warm start: read %d weights\n", idx); + printf("Warm start: read %zu weights\n", idx); if (line) free(line); @@ -585,4 +580,3 @@ double* read_old_weights(const char *filename, int * num_weights) { return w; } -