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

Optimised code for compute_blob_loss_multi and style change in compute_compound_loss #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aymuos15
Copy link

@aymuos15 aymuos15 commented Sep 5, 2024

What Changed:
Mostly associated with batch processing and vectorisation. The unit test notebook has the code commented well highlighting the changes.

Sanity Checks (Turn on GPU on colab other wise it throws an error):
Unit Test for the function Change: https://colab.research.google.com/drive/1RWlZ2xGq_5AAhvt-nO02Bqbg3fjetH2r?usp=sharing

Comparing Speed in 3d: https://colab.research.google.com/drive/18WRo84ONO06FkRQX5PSSuBzg0RlVqAPL?usp=sharing

Comparing Speed in 2d: https://colab.research.google.com/drive/1-I-2X_29Hula7UfCIgAGSJnOV_IpVqEP?usp=sharing

Just run all in each notebook.

TLDR Improvements:
In 2D:
Main Improvement comes from larger batches and images sizes > 32
For smaller batches, and size upto 32 or so, there isnt improvement.

In 3D:
Generally 1.8x - 2.2x Faster (considering a batch size of 2; I imagine bigger batches will lead to more improvement)

Do let me know if there are more tests which need to be run of if something is faulty.

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