glow-pytorch
glow-pytorch copied to clipboard
Update train.py
Implemented a complete training pipeline for the Glow model, including:
- Data Loading: Added dynamic data loading with image transformations.
- Training Loop: Includes loss calculation, learning rate scheduling, and early stopping.
- Validation: Periodically validates the model and saves checkpoints.
- Model Checkpointing: Saves model and optimizer state at intervals.
- Early Stopping: Halts training when no improvement is observed over a specified number of iterations.