BMTrain
BMTrain copied to clipboard
Add gc and fix typo
Pull Request Template
Issue Reference
N/A
Description
Adding gc collect and torch.cuda.empty_cache() after del to make sure device memory is freed immediately.
Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
N/A
Checklist
- [x] I have read the CONTRIBUTING document.
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.
Additional Information
N/A
PTAL @MayDomine