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

ESP-NN kernel does not allow for hybrid models (TFMIC-24) #81

Open
andresovela opened this issue May 28, 2024 · 2 comments
Open

ESP-NN kernel does not allow for hybrid models (TFMIC-24) #81

andresovela opened this issue May 28, 2024 · 2 comments

Comments

@andresovela
Copy link

Running a model with a fully connected layer with different input / filter types fails due to the following assert in the ESP-NN kernel:

TF_LITE_ENSURE_MSG(context, input->type == filter->type,
"Hybrid models are not supported on TFLite Micro.");

In the normal kernel this condition is more relaxed:

if ((input->type == kTfLiteFloat32 && filter->type != kTfLiteFloat32) ||
(input->type == kTfLiteInt8 &&
(filter->type != kTfLiteInt8 && filter->type != kTfLiteInt4)) ||
(input->type == kTfLiteInt16 && filter->type != kTfLiteInt8)) {
MicroPrintf("Input type: %s with filter type : %s not supported.",
TfLiteTypeGetName(input->type),
TfLiteTypeGetName(filter->type));
return kTfLiteError;
}

@github-actions github-actions bot changed the title ESP-NN kernel does not allow for hybrid models ESP-NN kernel does not allow for hybrid models (TFMIC-24) May 28, 2024
@vikramdattu
Copy link
Collaborator

@andresovela thanks for bringing it to our attention. I will update the port files by this weekend and release the code.

@vikramdattu
Copy link
Collaborator

@andresovela should be fixed with latest change: 30f24e6.
The latest commit is tagged with v1.3.1 and is pushed to component manager as well.

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

2 participants