PyTorch Lightning + Optuna!
Optuna is a hyperparameter optimization framework applicable to machine learning frameworks and black-box optimization solvers. PyTorch Lightning provides a lightweight PyTorch wrapper for better scaling with less code. Combining the two of them allows for automatic tuning of hyperparameters to find the best performing models.
Creating the Objective Function
Defining the hyperparameters to be tuned
Running the Trials
Pruning — Early Stopping of Poor Trials

To the Future, and Beyond!
链接地址:https://medium.com/optuna/using-optuna-to-optimize-pytorch-lightning-hyperparameters-d9e04a481585