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

hidden_size is most likely undefined on line 460... #34

Open
newsbubbles opened this issue Nov 15, 2022 · 0 comments
Open

hidden_size is most likely undefined on line 460... #34

newsbubbles opened this issue Nov 15, 2022 · 0 comments

Comments

@newsbubbles
Copy link

model['Whd'] = new RandMat(output_size, hidden_size, 0, 0.08);

On line 460 there is a call to make a new random matrix, and the second argument is hidden_size which is only actually defined inside the for loop above it, meaning it should resolve the argument d to undefined when calling the RandMat function because it is out of scope.

I only caught this because I am porting your rl.js to c++ and when doing a unit test, came across this one. I then realized most likely javascript would have let this one slip right under your nose, or anyone's noses, as these RL learners are so good at learning regardless of coding errors.

I hope one day you update as this is a 7 year old repository. I can imagine what you have learned about RL in 7 years and working with Tesla. It would be amazing to see some of the newer stuff like the recent DeepMind paper about continuous action space and their "Director" agent. This lib could provide even more generalization. Anyway, thanks for your wonderful code and keep up the great work. I like the way you go about things, and I can also imagine while porting this, that quite possibly you already made this in c++ and were actually porting it to JS as you refer to some things in comments as structs.

Thanks, and I hope you see this.

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

1 participant