Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dalelane opened this issue Jan 19, 2024 · 3 comments
Open
Assignees

Comments

@dalelane
Copy link

dalelane commented Jan 19, 2024

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.

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 dalelane added the type:bug Something isn't working label Jan 19, 2024
@gaikwadrahul8 gaikwadrahul8 self-assigned this Jan 20, 2024
@gaikwadrahul8
Copy link
Contributor

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/tfjs@4.16.0 but it's not throwing the error message with @tensorflow/tfjs@4.15.0 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/tfjs@4.16.0 for reference :

image

@dalelane
Copy link
Author

dalelane commented Feb 3, 2024

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants