summaryrefslogtreecommitdiff
path: root/test/unit_tests/layer.test.js
diff options
context:
space:
mode:
authorChristian Hodgden <chrhodgden@gmail.com>2024-02-09 14:57:48 +0000
committerChristian Hodgden <chrhodgden@gmail.com>2024-02-09 14:57:48 +0000
commit118f623577d7e033fa6ddbbe3823d48ffde29c12 (patch)
tree52023be957d31919fe5aecde363886f997888cf6 /test/unit_tests/layer.test.js
parentd8e17c036eecadb17c6521fac23a5d956b8fd415 (diff)
added module imports and describe() method to layer testing
Diffstat (limited to 'test/unit_tests/layer.test.js')
-rw-r--r--test/unit_tests/layer.test.js29
1 files changed, 18 insertions, 11 deletions
diff --git a/test/unit_tests/layer.test.js b/test/unit_tests/layer.test.js
index 37402d3..d7dcdb8 100644
--- a/test/unit_tests/layer.test.js
+++ b/test/unit_tests/layer.test.js
@@ -1,15 +1,22 @@
-console.log('Hello from layer.test.js');
+const BinaryConverter = require('../../src/binaryConverter');
+const Layer = require('../../src/layer');
+const math = require('mathjs');
-let testLayer = new Layer(2, 3, 'relu');
-let testConv = new BinaryConverter(2);
+describe('Test Layer module', () => {
-console.log(testLayer);
-console.log(testConv.randomInput());
+ let testLayer = new Layer(2, 3, 'relu');
+ let testConv = new BinaryConverter(2);
+
+ testConv.randomInput()
+ testLayer.forwardPropogation(testConv.inputActivation);
+
+ testLayer = new Layer(2, 3, 'sigmoid');
+ testLayer.forwardPropogation(testConv.inputActivation);
+
+ testLayer = new Layer(2, 3, 'identity');
+ testLayer.forwardPropogation(testConv.inputActivation);
+
+ test.todo('Layer Tests');
-console.log(testLayer.forwardPropogation(testConv.inputActivation));
+});
-testLayer = new Layer(2, 3, 'sigmoid');
-console.log(testLayer.forwardPropogation(testConv.inputActivation));
-
-testLayer = new Layer(2, 3, 'identity');
-console.log(testLayer.forwardPropogation(testConv.inputActivation));