`console.log(tf.getBackend())` reports undefined before using any operations.
See original GitHub issueTo get help from the community, we encourage using Stack Overflow and the tensorflow.js
tag.
TensorFlow.js version
1.1.2
Browser version
chomre 74
Describe the problem or feature request
console.log(tf.getBackend())
reports undefined before using any operations.
Code to reproduce the bug / link to feature request
https://github.com/QuantumInformation/tensorflowjs-playground/blob/master/src/Playground.ts#L4
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
'info' and 'history' are undefined in tensorflow.js's model
I'm trying to build simple machine learning model using tensorflow.js library in my expo project.
Read more >Tensorflow.js tf.getBackend() Function - GeeksforGeeks
The tf.getBackend() function is used to return the current backend name. Syntax: tf.getBackend(). Parameters:.
Read more >Creates a tf.Tensor with the provided values, shape and dtype.
This function returns the shape of the result of an operation between two tensors of size s0 and s1 performed with broadcast. Parameters:...
Read more >UNPKG - @tensorflow/tfjs-core
@tensorflow/tfjs-core/dist/tf-core.js.map ... sizeFromShape(shape);\n * console.log(size);\n * ```\n *\n * @doc ... timerAvailable()) {\n timer = this.
Read more >Viewing online file analysis results for 'miner.js'
Submit malware for free analysis with Falcon Sandbox and Hybrid Analysis technology. Hybrid Analysis develops and licenses analysis tools to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Waiting for
await tf.ready()
helps.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.