@imaduddin/fastbrain 1.0.7 → 1.0.8

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": "@imaduddin/fastbrain",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Raw-JAVASCRIPT Based Matirx and AI LLM Package called fastBrain.",
5
5
  "keywords": [
6
6
  "ai",
@@ -63,7 +63,7 @@ export class model {
63
63
  }
64
64
  async backward(x, target, lr) {
65
65
  const encoder = await this.op.CreateEncoder()
66
- const { acc, loss } = await this.softmax.crossEntropy(probs, target)
66
+ const { acc, loss } = await this.softmax.crossEntropy(x, target)
67
67
  let dLogits = await this.softmax.backward(x, target, encoder)
68
68
  let dInput = await this.linear.backward(dLogits, lr, encoder)
69
69
  for (let i = this.blocks.length - 1; i >= 0; i--) {