Open ralphtheninja opened 6 years ago
Ideally session.run()
should take a callback as last argument or it could return a Promise
which resolves to result
.
Agree; need to see if we can make this work with ffi, and add a runAsync that returns a Promise.
If we can't with just ffi it may be an interesting feature request for the TensorFlow C API.
This seems simpler than I thought it might have been with what ffi supports -- for reference: https://github.com/node-ffi/node-ffi/wiki/Node-FFI-Tutorial#async-library-calls
So the
session.run()
operation is synchronous. If this can take a lot of time it doesn't really play nice with the node way of doing things.Is it possible to make operations like this async using
node-ffi
?