Skip to content

Conversation

maltanar
Copy link
Collaborator

  • Clean reimplementation of the core multithresholding implementation based solely on numpy broadcasting and vectorized ops, no more loops. Much faster and capable of supporting arbitrary dimensionality/data layout.
  • Allow core multithresholding op to optionally do channels-last conversion where needed, simplifying the MultiThreshold op wrapper.
  • Bring back performance benchmark in test_multithreshold.py
  • Expands test cases for the core multithresholding implementation to cover more combinations of dimensions and tensor shapes

Example run from performance benchmark:

input size (128, 1024, 1) with 254 global (not per-channel) thresholds

before:
Runtime non-vectorized:  31.17622971534729 s
Runtime vectorized:  128.39458513259888 s
Speed-up:  0.24281576737173294

after:
Runtime non-vectorized:  31.00561213493347 s
Runtime vectorized:  0.057237863540649414 s
Speed-up:  541.6975794862396

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