diff options
Diffstat (limited to 'test/unit_tests/activationFunctions.test.js')
-rw-r--r-- | test/unit_tests/activationFunctions.test.js | 11 |
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); |