@mineproness/tensorloop 1.2.0 → 1.2.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mineproness/tensorloop",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "The most powerfull Machine Learning Library for AI.",
5
5
  "keywords": [
6
6
  "ai",
@@ -3,10 +3,10 @@ export class Softmax{
3
3
  const max = Math.max(...xLi)
4
4
  const exp = xLi.map((e)=> Math.exp(e - max))
5
5
  const sum = exp.reduce((a,b)=> a + b , 0)
6
- return exp.map((e)=> e / sum)
6
+ return new Float32Array(exp.map((e)=> e / sum))
7
7
  }
8
8
  backward(probs , target){
9
- const pro = [...probs]
9
+ const pro = new Float32Array([...probs])
10
10
  pro[target] -= 1
11
11
  return pro
12
12
  }