tfjs icon indicating copy to clipboard operation
tfjs copied to clipboard

dict provided in model.execute(dict) must be complex64, but was float32

Open dalelane opened this issue 1 year ago • 3 comments

There appears to have been a regression in being able to run SPICE between tfjs 4.15.0 and 4.16.0

It works correctly in TFJS 4.15.0

In TFJS 4.16.0 calling model.execute results in:

Uncaught Error: The dtype of dict['Real'] provided in model.execute(dict) must be complex64, but was float32

I've provided a demo at https://github.com/dalelane/spice-demo/blob/main/README.md

There are two versions of the same page there. They are identical except for the version of tfjs.

  • 4.15.0 - https://dalelane.github.io/spice-demo/415/spice.html
  • 4.16.0 - https://dalelane.github.io/spice-demo/416/spice.html

Click on the START DEMO button and watch the browser console. In the 4.15.0 version there aren't errors, in the 4.16.0 version there is.

I've tried casting the tensors I'm giving to complex64 that the error appears to be asking for, but that just caused other problems as it wasn't what was expected.

Any suggestions for how to investigate or workaround this would be greatly appreciated.

dalelane avatar Jan 19 '24 19:01 dalelane

Hi, @dalelane

I apologize for the delayed response and I tried to replicate the same behavior from my end with your provided demos and I'm also getting same error with @tensorflow/[email protected] but it's not throwing the error message with @tensorflow/[email protected] so we'll have to dig more into this issue and will update you soon. thank you for bringing this issue to our attention, I really appreciate your valuable time and efforts.

Thank you for your cooperation and patience.

Demo output error log with @tensorflow/[email protected] for reference :

image

gaikwadrahul8 avatar Jan 22 '24 12:01 gaikwadrahul8

for what it's worth, this problem still seems to be present in the latest TFJS release, 4.17.0

(It was optimistic to hope that it might've been fixed by chance, but I thought I'd check anyway)

dalelane avatar Feb 03 '24 17:02 dalelane

Can anyone think of a workaround to get this working again in any TFJS release since 4.15 ?

dalelane avatar May 18 '24 14:05 dalelane