Skip to content

Conversation

anilcanbulut
Copy link

@anilcanbulut anilcanbulut commented Dec 29, 2023

Refactored the existing nested loop structure within the Anomaly Attention class used for finding the distance between the indexes. Replaced the original dual for-loops, which scaled with window size, with a more efficient implementation.

Performance Improvement:

  • Original execution time for a window size of 250: ~50 seconds.
  • New execution time for the same window size: ~0.01 seconds.

I was experimenting with different window sizes to see their effects on my dataset. However, in my current setup where I use a high-performance workstation, it started to take too much time when I increased the window size. This new approach takes much more lower time to achieve the same matrix.

Refactored the existing nested loop structure within the Anomaly Attention class used for finding the distance between the indexes. Replaced the original dual for-loops, which scaled with window size, with a more efficient implementation.

Performance Improvement:
- Original execution time for a window size of 250: ~50 seconds.
- New execution time for the same window size: ~0.01 seconds.

This enhancement significantly boosts the model's performance, especially for larger window sizes, making it more practical for use in high-performance environments.
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.

1 participant