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

Consistent return with train and evolve methods. #78

Open
eugenioclrc opened this issue Sep 29, 2017 · 1 comment
Open

Consistent return with train and evolve methods. #78

eugenioclrc opened this issue Sep 29, 2017 · 1 comment

Comments

@eugenioclrc
Copy link
Contributor

If i run network.evolve the function return a promise with the result, but if i run network.train i get a result.

Shouldnt they be consistent? shouldnt both of them return a promise?

@wagenaartje
Copy link
Owner

That is because network.evolve is an async function and network.train is a sync function. There is not a lot I can do about it, except for creating two seperate functions for network.evolve, e.g.:

network.evolveSync();
network.evolve()

But network.evolveSync wouldn't be able to use multithreading capabilities then. However, it seems a good idea to add a network.trainAsync() function.

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