To get help from the community, we encourage using Stack Overflow and the tensorflow.js tag.
1.1.2
chomre 74
console.log(tf.getBackend()) reports undefined before using any operations.
https://github.com/QuantumInformation/tensorflowjs-playground/blob/master/src/Playground.ts#L4
This question is better asked on StackOverflow since it is not a bug or feature request. There is also a larger community that reads questions there.
Re-opening as this might be a bug.
This is kind of expected because it's technically the truth.
However, from the user's point of view this definitely seems wrong. We can solve this by initializing the backend when the user calls that, just as calling tf.backend() would.
Technical details:
Backends are initialized lazily. Only when you call an op do we find the best backend and initialize it. We do this for a few of the engine methods, e.g. tf.backend(), tf.findBackend(name), etc. We should probably do it for this one too.
Closing this due to lack of activity, feel to reopen. Thank you
Most helpful comment
This is kind of expected because it's technically the truth.
However, from the user's point of view this definitely seems wrong. We can solve this by initializing the backend when the user calls that, just as calling
tf.backend()would.Technical details:
Backends are initialized lazily. Only when you call an op do we find the best backend and initialize it. We do this for a few of the engine methods, e.g.
tf.backend(),tf.findBackend(name), etc. We should probably do it for this one too.