@mineproness/tensorloop 1.3.3 → 1.3.6

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.3",
3
+ "version": "1.3.6",
4
4
  "description": "The most powerfull Machine Learning Library for AI.",
5
5
  "keywords": [
6
6
  "ai",
@@ -4,9 +4,8 @@ export class SelfAttention{
4
4
  k : Float32Array[]
5
5
  input;
6
6
  constructor(embeddingSize : number, configs: {
7
- save: {
8
7
  dirname: string
9
- }
8
+
10
9
  })
11
10
  weights : Float32Array[]
12
11
  score : number
@@ -17,9 +17,9 @@ export class SelfAttention {
17
17
  this.configs = configs
18
18
  this.softmax = new Softmax()
19
19
  this.score = Math.sqrt(embeddingSize)
20
- this.query = new Linear(embeddingSize, embeddingSize, { save: { filename: [`./${configs.dirname}/query.bin`, `./${configs.dirname}/queryBias.bin`] } })
21
- this.key = new Linear(embeddingSize, embeddingSize, { save: { filename: [`./${configs.dirname}/key.bin`, `./${configs.dirname}/keyBias.bin`] } })
22
- this.value = new Linear(embeddingSize, embeddingSize, { save: { filename: [`./${configs.dirname}/value.bin`, `./${configs.dirname}/valueBias.bin`] } })
20
+ this.query = new Linear(embeddingSize, embeddingSize, { save: { filename: [`${configs.dirname}/query.bin`, `${configs.dirname}/queryBias.bin`] } })
21
+ this.key = new Linear(embeddingSize, embeddingSize, { save: { filename: [`${configs.dirname}/key.bin`, `${configs.dirname}/keyBias.bin`] } })
22
+ this.value = new Linear(embeddingSize, embeddingSize, { save: { filename: [`${configs.dirname}/value.bin`, `${configs.dirname}/valueBias.bin`] } })
23
23
  }
24
24
  forward(vectors) {
25
25
  this.q = vectors.map((e) => this.query.forward(e))