repo.or.cz
/
liba.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
fix emscripten builds on windows
[liba.git]
/
quickjs
/
test
/
tf.js
blob
20e9e6532fb9ad013dfdf38abdb19f7303693c41
1
import * as a from "liba.so";
2
function assert(expr) {
3
if (!eval(expr)) {
4
throw Error(expr);
5
}
6
}
7
var num = [6.59492796e-05, 6.54019884e-05];
8
var den = [-1.97530991, 0.97530991];
9
var ctx = new a.tf(num, den);
10
ctx.iter(1);
11
assert("ctx.num");
12
assert("ctx.den");
13
assert("ctx.input");
14
assert("ctx.output");
15
ctx.num = [1];
16
ctx.den = [2];
17
assert("ctx.num");
18
assert("ctx.den");
19
assert("ctx.input");
20
assert("ctx.output");
21
ctx.zero();