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

confused about using model #16

Open
Baael opened this issue Jul 12, 2019 · 1 comment
Open

confused about using model #16

Baael opened this issue Jul 12, 2019 · 1 comment

Comments

@Baael
Copy link

Baael commented Jul 12, 2019

Hello! Really nice library, thank you!
I am bit confused, I've trained model with good results, saved it to file and now I would like to use with model.predict in "plain" tensorflow.js or even something like agent.predict.
How can I do that? I am new to tensorflow.js, tried multiple options, always getting errors that shape is different than expected on tensor2d contruction.

Thank you for your help.

@Pravez
Copy link
Collaborator

Pravez commented Sep 17, 2019

Hi ! Sorry for the delay.
For what I understood, you want to use the model trained with ReimproveJS in a plain tensorflow.js environment, without the library.

The problem must be the size of your input. Indeed the neural network in ReimproveJS is taking as input the current state plus a specified quantity of previous states and previous taken actions. By default it is set to 1. So for instance if your state is of size 5 and your actions is of size 1, then the size of the input will be of 5+5+1, so 11.

Hope this helps

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