@mineproness/tensorloop 1.3.8 → 1.4.0

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.3.8",
3
+ "version": "1.4.0",
4
4
  "description": "The most powerfull Machine Learning Library for AI.",
5
5
  "keywords": [
6
6
  "ai",
@@ -60,7 +60,7 @@ export class Linear {
60
60
  const weights = this.Weights
61
61
  const inputGradient = new Float32Array(input.length)
62
62
  for (let a = 0; a < weights.length; a++) {
63
- const gran = outputGradient[a]
63
+ const gran = Math.max(-1, Math.min(1, outputGradient[a]))
64
64
  const w = weights[a]
65
65
  for (let at = 0; at < input.length; at++) {
66
66
  inputGradient[at] += gran * w[at]