summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/unit_tests/activationFunctions.test.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/unit_tests/activationFunctions.test.js b/test/unit_tests/activationFunctions.test.js
index 4b68deb..2ed0cfe 100644
--- a/test/unit_tests/activationFunctions.test.js
+++ b/test/unit_tests/activationFunctions.test.js
@@ -4,10 +4,15 @@ const math = require('mathjs');
describe('Test Activation Function module', () => {
let result;
- let testVector = [-2, -1, 0, 1, 2];
- testVector = math.matrix(testVector);
- let testMatrix = math.matrix([testVector, testVector]);
+ let testVector;
+ let testMatrix;
+ beforeEach(() => {
+ testVector = [-2, -1, 0, 1, 2];
+ testVector = math.matrix(testVector);
+ testMatrix = math.matrix([testVector, testVector]);
+ });
+
result = activationFunctionList['sigmoid'].gx(testVector);
result = activationFunctionList['sigmoid'].dg_dx(testVector);