mini-jstorch 1.1.0 → 1.1.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/README.md +4 -1
- package/package.json +1 -1
- package/example.js +0 -23
package/README.md
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
# mini-jstorch README
|
|
2
2
|
|
|
3
|
+
## !IMPORTANT! ##
|
|
4
|
+
**Some System Internal at mini-jstorch now has some bug plesae try the module at other time we are gonna fix this error around 20 minutes or 1 hour.**
|
|
5
|
+
|
|
3
6
|
## Overview
|
|
4
|
-
*mini-jstorch* module is a lightweight, **PyTorch-inspired** neural network library in JavaScript. It provides basic components to build, train, and optimize neural networks
|
|
7
|
+
*mini-jstorch BETA* module is a lightweight, **PyTorch-inspired** neural network library in JavaScript. It provides basic components to build, train, and optimize neural networks
|
|
5
8
|
and are not heavy.
|
|
6
9
|
|
|
7
10
|
## Features
|
package/package.json
CHANGED
package/example.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// example.js
|
|
2
|
-
import { Seq, Dense, act, SGD, train } from './index.js';
|
|
3
|
-
|
|
4
|
-
// Buat model
|
|
5
|
-
const model = new Seq();
|
|
6
|
-
model.add(new Dense(3, 5, act.leakyRelu));
|
|
7
|
-
model.add(new Dense(5, 1));
|
|
8
|
-
|
|
9
|
-
// Buat optimizer
|
|
10
|
-
const optimizer = new SGD(0.01);
|
|
11
|
-
|
|
12
|
-
// Contoh data training
|
|
13
|
-
const x = [[1, 2, 3]];
|
|
14
|
-
const y = [[1]];
|
|
15
|
-
|
|
16
|
-
// Loss function sederhana
|
|
17
|
-
const lossFn = (pred, target) => pred[0] - target[0];
|
|
18
|
-
|
|
19
|
-
// Train model
|
|
20
|
-
train(model, x, y, lossFn, optimizer, 10);
|
|
21
|
-
|
|
22
|
-
// Tampilkan summary
|
|
23
|
-
model.summary();
|