tfjs 2.8.1 change in behavior in tf.reshape causes errors
See original GitHub issueupon upgrade from 2.7.0 to 2.8.1, my existing app fails with:
Uncaught (in promise) Error: The implicit shape can't be a fractional number. Got 266 / 3
at Object.inferFromImplicitShape (util_base.ts:328)
at Object.reshape76 [as kernelFunc] (Reshape.ts:35)
at kernelFunc3 (engine.ts:590)
at engine.ts:660
at Engine.scopedRun (engine.ts:453)
at Engine.runKernelFunc (engine.ts:657)
at Engine.runKernel (engine.ts:522)
at reshape_ (reshape.ts:60)
at reshape__op (operation.ts:51)
this may be desired behavior, but it breaks several existing models published on tfhub
!
e.g, i’m using blazeface
where reshape
is failing on results of model inference, so not like that can be changed easily:
const [contours, confidence, contourCoords] = this.meshDetector.predict(face);
const coordsReshaped = tf.reshape(contourCoords, [-1, 3]);
let rawCoords = coordsReshaped.arraySync();
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Creates a tf.Tensor with the provided values, shape and dtype.
Pass a `WebGLData` object and specify a shape yourself. // This makes it possible for TF.js applications to avoid GPU / CPU sync....
Read more >Tensorflow.js tf.reshape() Function - GeeksforGeeks
js. The tf. reshape() function is used to reshape a given tensor with the specified shape. Parameters: This function has the following ...
Read more >tensorflow/tfjs-core - UNPKG
n * @param msg A function that returns the message to report when throwing an\n * error. We use a function for performance...
Read more >tf.cast not changing the dtype ORIGINAL ISSUE:tensorflowjs ...
In case anybody gets the same error, the answer I got from the github repository maintainers is that TFJS right now only supports...
Read more >@tensorflow/tfjs: Versions | Openbase
Full version history for @tensorflow/tfjs including change logs. ... DEV [Fix a few tests in layers which caused errors on the console, but...
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
Thanks for the bug report, we will release the fix in 2.8.2 next week.
Are you satisfied with the resolution of your issue? Yes No