Skip to content

Conversation

ShardulNalegave
Copy link
Contributor

  • ESP-NN currently does not have a function for per-channel data
  • Using the existing method gives incorrect outputs
  • Fallback to TFLM implementation in such cases

Description

TFLM has a separate FullyConnectedPerChannel implementation for per-channel data. There existing ESP-NN method used for this data and gives incorrect outputs. Therefore, if data.is_per_channel is true then fallback to TFLM implementation for the time being.

Testing

Test ran a MobileNetV2 quantized model and compared its expected and actual outputs after this fix.

Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@github-actions github-actions bot changed the title Fallback to TFLM processing logic for per-channel data in FullyConnected Fallback to TFLM processing logic for per-channel data in FullyConnected (TFMIC-52) Feb 6, 2025
- ESP-NN currently does not have a function for per-channel data
- Using the existing method gives incorrect outputs
- Fallback to TFLM implementation in such cases
@ShardulNalegave ShardulNalegave force-pushed the fully_connected_channelwise_fallback branch from 8818b4c to d4268f0 Compare February 17, 2025 07:04
@vikramdattu
Copy link
Collaborator

I will close the PR, since the per ch optimisation is available and can be pulled in with esp-nn v1.1.1

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

Successfully merging this pull request may close these issues.

2 participants