@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 +1 -1
- package/src/model/index.js +1 -1
package/package.json
CHANGED
package/src/model/index.js
CHANGED
|
@@ -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(
|
|
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--) {
|