Skip to content

New TFLiteConverter not working with tf.complex64 #38932

Closed

Description

@galah92

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Colab CPU
  • TensorFlow version (use command below): 2.2.0-rc3

Describe the current behavior
New TFLiteConverter not working with tf.complex64
Disabling the new converter (converter.experimental_new_converter = False) works.

Standalone code to reproduce the issue

@tf.function
def foo(x, y):
    return x @ y


x = tf.constant([[1, 2, 3], [4, 5, 6]], dtype=tf.complex64)
y = tf.constant([[2, 3], [4, 5], [6, 7]], dtype=tf.complex64)

foo_concrete = foo.get_concrete_function(x, y)
converter = tf.lite.TFLiteConverter.from_concrete_functions([foo_concrete])
foo_tflite = converter.convert()

colab example

Thanks

Activity

  1. added
    comp:lite
    TF 2.2
    on Apr 27, 2020
  2. assigned and unassigned on Apr 27, 2020
  3. haozha111 commented on Apr 28, 2020

    @haozha111
    Contributor

    @karimnosseir ,could you take a look? thanks!

  4. galah92 commented on May 16, 2020

    @galah92
    Author

    Any update on this?

  5. karimnosseir commented on May 21, 2020

    @karimnosseir
    Contributor

    Sorry for the delay.
    I have a fix that should get merged soon.

    Note: that FullyConnected op in TFLite doesn't support complex, so you will need to enable TF_SELECT_OPS to run it.

  6. google-ml-butler commented on May 21, 2020

    @google-ml-butler

    Are you satisfied with the resolution of your issue?
    Yes
    No

  7. galah92 commented on Jun 3, 2020

    @galah92
    Author

    @karimnosseir Thanks! Are there plans to support complex for FullyConnected op in TFLite?

  8. karimnosseir commented on Jun 8, 2020

    @karimnosseir
    Contributor

    @galah92 Sorry for the delay.
    No immediate plans.

  9. added 2 commits that reference this issue on Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

TF 2.2comp:litetype:bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions