15 lines
394 B
JavaScript
15 lines
394 B
JavaScript
|
import { assert, assertEquals } from "https://deno.land/std@0.102.0/testing/asserts.ts";
|
||
|
import * as NN from "./nn.ts";
|
||
|
|
||
|
Deno.test("NN.Observe", ()=>
|
||
|
{
|
||
|
console.log(NN.Observe([[[1, 2, 3]]], [[[0.4, 0.5, 0.6]]]));
|
||
|
});
|
||
|
Deno.test("NN.Train", ()=>
|
||
|
{
|
||
|
const stages = [[[1, 2, 3]]];
|
||
|
const layers = [[[0.4, 0.5, 0.6]]];
|
||
|
|
||
|
console.log(NN.Train(stages, layers, [[0, 0, 1]], 0.1));
|
||
|
});
|