@mineproness/tensorloop 1.4.9 → 1.5.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/index.js +0 -2
- package/package.json +1 -1
- package/src/TransformerBlock/index.js +1 -1
package/index.js
CHANGED
|
@@ -9,7 +9,6 @@ import {PositionEmbedding as PE} from './src/PositionEmbedding/index.js'
|
|
|
9
9
|
import {SelfAttention as ST} from './src/SelfAttention/index.js'
|
|
10
10
|
import {GELU as GU} from './src/GELU/index.js'
|
|
11
11
|
import {FFN as ffn} from './src/FFN/index.js'
|
|
12
|
-
import {LayerNorm as LN} from './src/LayerNorm/index.js'
|
|
13
12
|
import { TransformerBlock as TB} from './src/TransformerBlock/index.js'
|
|
14
13
|
export const Tokenizer = tokenizer
|
|
15
14
|
export const Embedding = embeddding2
|
|
@@ -22,5 +21,4 @@ export const PositionEmbedding = PE
|
|
|
22
21
|
export const SelfAttention = ST
|
|
23
22
|
export const GELU = GU
|
|
24
23
|
export const FFN = ffn
|
|
25
|
-
export const LayerNorm = LN
|
|
26
24
|
export const TransformerBlock = TB
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ export class TransformerBlock {
|
|
|
8
8
|
this.selfAttention = new SelfAttention(embeddingSize, configs)
|
|
9
9
|
}
|
|
10
10
|
forward(input) {
|
|
11
|
-
const attention = this.selfAttention.forward(
|
|
11
|
+
const attention = this.selfAttention.forward(input)
|
|
12
12
|
return this.ffn.forward(normal2)
|
|
13
13
|
}
|
|
14
14
|
backward(dOutput, learningRate) {
|