aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorjvech <jmvalenciae@unal.edu.co>2024-09-03 20:08:25 -0500
committerjvech <jmvalenciae@unal.edu.co>2024-09-03 20:08:25 -0500
commitf39f6d5b0a907d519377e70876b32daad1a676f2 (patch)
treee5462ac42b395e2e9938de53ffbfbf6f0380d3de /src/main.c
parente8624e1ebcabcc831d651e0beefe32df1463c903 (diff)
feat: shuffle dataset on each epoch done
The CLI option to disable it was also added.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
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])) {
Feel free to download, copy and edit any repo