Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to reference Brain()? #79

Open
windmaple opened this issue Oct 31, 2016 · 1 comment
Open

how to reference Brain()? #79

windmaple opened this issue Oct 31, 2016 · 1 comment

Comments

@windmaple
Copy link

windmaple commented Oct 31, 2016

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 .....

@thomaswmanion
Copy link

const deepqlearn = require('convnetjs/build/deepqlearn');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants