-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update resize() to be on par with torchvision speed (#144)
Summary: - [x] I have read CONTRIBUTING.md to understand how to contribute to this repository :) **Summary:** Refactored `resize()` from image/functional.py to be on par with torchvision. However, I just have one minor failure in my code. Please advise on where I should look :) **Test results** The following results were acquired from my machine - Augly original (without interpolation)= 0.04475s - Augly revised (with interpolation) = 0.02873s - torchvision (uses interpolation) = 0.02696s **Test code** → https://colab.research.google.com/drive/14-KZdSGaOaz73OgIS0DZZY4RsS3cJ0rg#scrollTo=xVI_h-1v49lC ## Unit Tests If your changes touch the `audio` module, please run all of the `audio` tests and paste the output here. Likewise for `image`, `text`, & `video`. If your changes could affect behavior in multiple modules, please run the tests for all potentially affected modules. If you are unsure of which modules might be affected by your changes, please just run all the unit tests. ``` ### Image ```bash python -m unittest discover -s augly/tests/image_tests/ -p "*_test.py" # Or `python -m unittest discover -s augly/tests/image_tests/ -p "*.py"` to run pytorch test too (must install `torchvision` to run) ``` **TEST OUTPUT** ``` ====================================================================== FAIL: test_Resize (transforms_unit_test.TransformsImageUnitTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/macbookpro/Desktop/Github/AugLy/augly/tests/image_tests/transforms_unit_test.py", line 187, in test_Resize self.evaluate_class(imaugs.Resize(), fname="resize") File "/Users/macbookpro/Desktop/Github/AugLy/augly/tests/image_tests/base_unit_test.py", line 111, in evaluate_class self.assertTrue( AssertionError: False is not true ---------------------------------------------------------------------- Ran 82 tests in 52.735s FAILED (failures=1, skipped=5) ``` Pull Request resolved: #144 Reviewed By: jbitton Differential Revision: D32664565 Pulled By: zpapakipos fbshipit-source-id: 871c1861fb146c98a9f69ede2ac4df82424ecb64
- Loading branch information
1 parent
4238abd
commit 5edf973
Showing
5 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters