Training Pipeline Enhancements #16
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enhances the training pipeline to address vanishing gradient problems that were preventing successful mixed precision training implementation. The primary focus is on implementing automatic mixed precision (AMP) support while making necessary architectural and pipeline improvements to ensure gradient stability. The changes include:
Automatic Mixed Precision (AMP) training support:
--use-amp
and--amp-dtype
flags to enable mixed precision training with both float16 and bfloat16 support. This can significantly reduce memory usage and training time on compatible GPUs while maintaining numerical stability through proper gradient scaling.Enhanced U-Net architecture with residual connections:
Improved training pipeline:
XPointPatchDataset
for better data augmentation, adds feature normalization for training stability, includes gradient clipping to prevent exploding gradients, and adds early stopping with patience to prevent overfitting. The data is also resampled when training, in that it is undersampled. Patches with no X-points are removed to match the number of patches with X-points present to create a balanced dataset.Enhanced optimization:
I have also updated the README file to include a description of what flags can be used.