From 3ef8450f3030200170d26c6353d865cf1b6a2fc0 Mon Sep 17 00:00:00 2001 From: steven nguyen <58114641+icecream17@users.noreply.github.com> Date: Sun, 13 Dec 2020 14:36:28 -0600 Subject: [PATCH 1/2] Fix incorrect array slicing parameters Ugh I keep getting this error whyyy. I put in 100 LAYERS! Well because of a bug. Array.slice(0, -1) instead of Array.slice(Start at length - 1) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice --- src/architecture/architect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/architecture/architect.js b/src/architecture/architect.js index 5b51aef6e..92b161d31 100644 --- a/src/architecture/architect.js +++ b/src/architecture/architect.js @@ -274,7 +274,7 @@ const architect = { layer_sizes = layer_sizes_and_options; options = {}; } else { - layer_sizes = layer_sizes_and_options.slice(layer_sizes_and_options.length - 1); + layer_sizes = layer_sizes_and_options.slice(0, -1); options = output_size_or_options; } From 43f33990c639f21c68b67672d7288fa77b052905 Mon Sep 17 00:00:00 2001 From: Manuel Raimann Date: Mon, 4 Jan 2021 18:56:22 +0100 Subject: [PATCH 2/2] Update src/architecture/architect.js --- src/architecture/architect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/architecture/architect.js b/src/architecture/architect.js index 92b161d31..9194d5fbd 100644 --- a/src/architecture/architect.js +++ b/src/architecture/architect.js @@ -274,7 +274,7 @@ const architect = { layer_sizes = layer_sizes_and_options; options = {}; } else { - layer_sizes = layer_sizes_and_options.slice(0, -1); + layer_sizes = layer_sizes_and_options.pop(); options = output_size_or_options; }