Skip to content

Commit

Permalink
Fix incorrect array slicing parameters
Browse files Browse the repository at this point in the history
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
  • Loading branch information
icecream17 authored and raimannma committed Dec 16, 2020
1 parent 13f1446 commit 3ef8450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/architecture/architect.js
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3ef8450

Please sign in to comment.