From f39f6d5b0a907d519377e70876b32daad1a676f2 Mon Sep 17 00:00:00 2001 From: jvech Date: Tue, 3 Sep 2024 20:08:25 -0500 Subject: feat: shuffle dataset on each epoch done The CLI option to disable it was also added. --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 3dc1b5f..848d638 100644 --- a/src/main.c +++ b/src/main.c @@ -93,6 +93,7 @@ int main(int argc, char *argv[]) { .epochs = 100, .batch_size = 32, .alpha = 1e-5, + .shuffle = true, .config_filepath = "", .network_size = 0, .only_out = false, @@ -140,7 +141,8 @@ int main(int argc, char *argv[]) { load_loss(ml_configs), ml_configs.epochs, ml_configs.batch_size, - ml_configs.alpha); + ml_configs.alpha, + ml_configs.shuffle); nn_network_write_weights(ml_configs.weights_filepath, network, ml_configs.network_size); fprintf(stderr, "weights saved on '%s'\n", ml_configs.weights_filepath); } else if (!strcmp("predict", argv[0])) { -- cgit v1.2.3-70-g09d2