@benp2325/benutils 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -1
- package/src/activations.js +2 -2
- package/.gitattributes +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@benp2325/benutils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "zero dependency personal library for math, array/matrix manipulation, and neural network modeling in JS",
|
|
5
5
|
"homepage": "https://github.com/BenPask/benutils",
|
|
6
6
|
"bugs": {
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"author": "Benjamin Pask",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"main": "index.js",
|
|
17
|
+
"files": [
|
|
18
|
+
"index.js",
|
|
19
|
+
"src/"
|
|
20
|
+
],
|
|
17
21
|
"scripts": {
|
|
18
22
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
19
23
|
}
|
package/src/activations.js
CHANGED
|
@@ -98,7 +98,7 @@ function deriv_no_activation(arr){
|
|
|
98
98
|
const activation_map = {"none":no_activation,"relu":reluActivation,"sigmoid":sigmoid_activation,"tanh":tanh_activation,"leaky_relu":leaky_relu_activation};
|
|
99
99
|
const deriv_acitvation_map = {"none":deriv_no_activation,"relu":deriv_relu_activation,"sigmoid":deriv_sigmoid_activation,"tanh":deriv_tanh_activation,"leaky":deriv_leaky_relu_activation};
|
|
100
100
|
|
|
101
|
-
function activate(model, arr_in, o_layer=false){
|
|
101
|
+
export function activate(model, arr_in, o_layer=false){
|
|
102
102
|
if(o_layer == true){
|
|
103
103
|
const acitvation_func = activation_map[model.properties.output_layer_info.activation];
|
|
104
104
|
return acitvation_func(arr_in);
|
|
@@ -107,7 +107,7 @@ function activate(model, arr_in, o_layer=false){
|
|
|
107
107
|
return acitvation_func(arr_in);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
function deriv_activate(model, arr_in, o_layer=false){
|
|
110
|
+
export function deriv_activate(model, arr_in, o_layer=false){
|
|
111
111
|
if(o_layer == true){
|
|
112
112
|
const acitvation_func = deriv_acitvation_map[model.properties.output_layer_info.activation];
|
|
113
113
|
return acitvation_func(arr_in);
|
package/.gitattributes
DELETED