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

Exporting TfLite QBatch Permutation #84

Open
sciapponi opened this issue Jan 31, 2024 · 0 comments
Open

Exporting TfLite QBatch Permutation #84

sciapponi opened this issue Jan 31, 2024 · 0 comments

Comments

@sciapponi
Copy link

In micromind.core.export()

qbatch is an optional function argument and it's assigned a None value if not provided.

Before calling micromind.convert_to_tflite() at line 297, qbatch is permuted as a four dimensional tensor from (B, C, W, H) to (B,H,W,C) which doesn't generalize to different input sizes or deal with None Input.

If qbatch is omitted:

m.export("tflite", "tflite", [1,100,777])

the raised error is:

Traceback (most recent call last):
  File "/home/ste/Code/python/tiny-vocos/test_xinet.py", line 597, in <module>
    m.export("tflite", "tflite", [1,100,777])
  File "/home/ste/Code/python/micromind/micromind/core.py", line 297, in export
    qbatch = qbatch.permute(0, 3, 2, 1)
AttributeError: 'NoneType' object has no attribute 'permute'

To fix this we would need a general permutation implementation for any dimension and a statement which deals with NoneType input.

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

No branches or pull requests

1 participant