From 1d07a7edbe3fa612bb52517d4b1a5097fc147779 Mon Sep 17 00:00:00 2001 From: dshunter107 Date: Mon, 22 Jan 2024 23:05:39 -0500 Subject: [PATCH 1/2] Uses an OS independent file separator. Closes issue #160 Before, the file directory was specified using only the windows file separator. As a result, users with other operating systems would have an error. This pull request fixes that. --- .../core/network/FractalityNetworkTest.java | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/lib/src/test/java/de/edux/core/network/FractalityNetworkTest.java b/lib/src/test/java/de/edux/core/network/FractalityNetworkTest.java index 9ef082d..e99e713 100644 --- a/lib/src/test/java/de/edux/core/network/FractalityNetworkTest.java +++ b/lib/src/test/java/de/edux/core/network/FractalityNetworkTest.java @@ -1,5 +1,10 @@ package de.edux.core.network; +import java.nio.file.Paths; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + import de.edux.ml.api.ExecutionMode; import de.edux.ml.mlp.core.network.NetworkBuilder; import de.edux.ml.mlp.core.network.layers.DenseLayer; @@ -8,8 +13,6 @@ import de.edux.ml.mlp.core.network.loader.Loader; import de.edux.ml.mlp.core.network.loader.MetaData; import de.edux.ml.mlp.core.network.loader.fractality.FractalityLoader; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; public class FractalityNetworkTest { @@ -18,22 +21,22 @@ public class FractalityNetworkTest { @BeforeAll static void setUp() { + fractalityTrainLoader = new FractalityLoader( - "src/test/resources/fractality/small_train/class", - "src/test/resources/fractality/small_train/images.csv", + Paths.get("src", "test", "resources", "fractility", "small_train", "class").toString(), + Paths.get("src", "test", "resources", "fractility", "small_train", "images.csv").toString(), 100, 64, 64); - fractalityTestLoader = - new FractalityLoader( - "src/test/resources/fractality/small_test/class", - "src/test/resources/fractality/small_test/images.csv", - 10, - 64, - 64); - } + fractalityTestLoader = new FractalityLoader( + Paths.get("src", "test", "resources", "fractility", "small_test", "class").toString(), + Paths.get("src", "test", "resources", "fractility", "small_test", "images.csv").toString(), + 10, + 64, + 64); +} @Test public void shouldTrain() { From b4b9f24552807ed88115821929369b96b23ad265 Mon Sep 17 00:00:00 2001 From: dshunter107 Date: Mon, 22 Jan 2024 23:08:45 -0500 Subject: [PATCH 2/2] fixes spelling error --- .../java/de/edux/core/network/FractalityNetworkTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/src/test/java/de/edux/core/network/FractalityNetworkTest.java b/lib/src/test/java/de/edux/core/network/FractalityNetworkTest.java index e99e713..a51a440 100644 --- a/lib/src/test/java/de/edux/core/network/FractalityNetworkTest.java +++ b/lib/src/test/java/de/edux/core/network/FractalityNetworkTest.java @@ -24,15 +24,15 @@ static void setUp() { fractalityTrainLoader = new FractalityLoader( - Paths.get("src", "test", "resources", "fractility", "small_train", "class").toString(), - Paths.get("src", "test", "resources", "fractility", "small_train", "images.csv").toString(), + Paths.get("src", "test", "resources", "fractality", "small_train", "class").toString(), + Paths.get("src", "test", "resources", "fractality", "small_train", "images.csv").toString(), 100, 64, 64); fractalityTestLoader = new FractalityLoader( - Paths.get("src", "test", "resources", "fractility", "small_test", "class").toString(), - Paths.get("src", "test", "resources", "fractility", "small_test", "images.csv").toString(), + Paths.get("src", "test", "resources", "fractality", "small_test", "class").toString(), + Paths.get("src", "test", "resources", "fractality", "small_test", "images.csv").toString(), 10, 64, 64);