forked from htm-community/highbrow
-
Notifications
You must be signed in to change notification settings - Fork 1
/
working.js
41 lines (36 loc) · 1.02 KB
/
working.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Lowbrow
// MIT License (see LICENSE)
// Copyright © 2005—2017 Numenta <http://numenta.com>
const fs = require("fs")
const Lowbrow = require("./src/lowbrow")
let networkConfiguration = {
name: "simple SP / TM network example",
origin: [0,0],
corticalColumns: [{
name: "column1",
layers: [
{
name: "inputLayer",
miniColumns: false,
neuronCount: 100,
dimensions: {
x: 10, y: 10, z: 1
}
},
{
name: "sptmLayer",
miniColumns: true,
neuronCount: 4096,
dimensions: {
x: 30, y: 35, z: 4
}
}
]
}]
}
network = Lowbrow.createHtmNetwork(networkConfiguration)
// Empty network should contain all inactive cells.
for (line of fs.readFileSync("data/highbrow-out.txt", "utf-8").trim().split("\n")) {
let data = JSON.parse(line)
network.update(data)
}