You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/luke/Developer/misc/tfjs-node-test/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:5710
throw new Error('values passed to tensor(values) must be a number/boolean/string or ' +
^
Error: values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray
at makeTensor (/Users/luke/Developer/misc/tfjs-node-test/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:5710:15)
at Object.tensor (/Users/luke/Developer/misc/tfjs-node-test/node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js:5936:12)
at test (file:///Users/luke/Developer/misc/tfjs-node-test/test.js:5:8)
at file:///Users/luke/Developer/misc/tfjs-node-test/test.js:15:1
at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Thank you for bringing this issue to our attention and I was able to reproduce the behavior on my end as well. It appears there may be a discrepancy between the TensorFlow.js documentation and the currently supported TypedArrays for tensor construction. While the documentation lists broader compatibility with all TypedArrays but at the moment seems like it only support (Uint8Array, Uint8ClampedArray, Int32Array, Float32Array) for tensor construction so most probably this issue will be considered as feature request if TensorFlow.js does not support remaining TypedArrays for tensor construction and I'll discuss this issue in our internal meeting and will update you soon on this. thank you for your valuable time and efforts bringing this issue to our attention
System information
Describe the current behavior
Only some types of TypedArrays can be passed to
tf.tensor
:Output:
The error for the failing arrays is:
Describe the expected behavior
Per the docs:
All
TypedArray
s, (listed on the MDN page that’s linked in the TensorFlow.js docs), should be valid for thetf.tensor
constructor.Standalone code to reproduce the issue
See above
The text was updated successfully, but these errors were encountered: