diff options
| author | Gertjan van den Burg <burg@ese.eur.nl> | 2014-07-02 13:21:20 +0200 |
|---|---|---|
| committer | Gertjan van den Burg <burg@ese.eur.nl> | 2014-07-02 13:21:20 +0200 |
| commit | 47b5cab33083557a52ffea167742db1c9877cf20 (patch) | |
| tree | 04f906ea5c871d86966a01b1f634e4c9ea3491f6 /src/trainMSVMMaj.c | |
| parent | fix in grid creation (diff) | |
| download | gensvm-47b5cab33083557a52ffea167742db1c9877cf20.tar.gz gensvm-47b5cab33083557a52ffea167742db1c9877cf20.zip | |
moved realloc around, fix for kernels in trainmsvmmaj and fix memory leak consistency repeats
Diffstat (limited to 'src/trainMSVMMaj.c')
| -rw-r--r-- | src/trainMSVMMaj.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/trainMSVMMaj.c b/src/trainMSVMMaj.c index 66f6450..af07fe7 100644 --- a/src/trainMSVMMaj.c +++ b/src/trainMSVMMaj.c @@ -95,12 +95,15 @@ int main(int argc, char **argv) model->m = data->m; model->K = data->K; model->data_file = input_filename; - + + // allocate model + msvmmaj_allocate_model(model); + // initialize kernel (if necessary) msvmmaj_make_kernel(model, data); - // allocate model and initialize weights - msvmmaj_allocate_model(model); + // reallocate model and initialize weights + msvmmaj_reallocate_model(model, data->n, data->m); msvmmaj_initialize_weights(data, model); // seed the random number generator (only place in programs is in |
