I feel it's a really stupid node question to ask, but really can't figure it out after a few hours. So here is the code that embarrasses me:
var convnetjs = require("convnetjs");
var net = new convnetjs.Net();
var brain = new convnetjs.deepqlearn.Brain(3, 2);
Basically it couldn't find Brain function:
weiwe-macbookpro:test weiwe$ node index.js
/Users/weiwe/test/index.js:5
var brain = new convnetjs.deepqlearn.Brain(3, 2);
^
TypeError: Cannot read property 'Brain' of undefined
at Object. (/Users/weiwe/test/index.js:5:37)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.runMain (module.js:590:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
I'm pretty sure the NPM module is installed correctly because I can use functions (e.g., Net()) in convnet.js just fine. Scratching my head on why this doesn't work .....
I feel it's a really stupid node question to ask, but really can't figure it out after a few hours. So here is the code that embarrasses me:
Basically it couldn't find Brain function:
I'm pretty sure the NPM module is installed correctly because I can use functions (e.g., Net()) in convnet.js just fine. Scratching my head on why this doesn't work .....