What is the best way to perform hyperparameter optimization for a Pytorch model? Implement e.g. Random Search myself? Use Skicit Learn? Or is there anything else I am not aware of?
相关问题
- How to use Reshape keras layer with two None dimen
- How to conditionally scale values in Keras Lambda
- Trying to understand Pytorch's implementation
- Convolutional Neural Network seems to be randomly
- How to convert Onnx model (.onnx) to Tensorflow (.
相关文章
- how to flatten input in `nn.Sequential` in Pytorch
- How to downgrade to cuda 10.0 in arch linux?
- How to fix this strange error: “RuntimeError: CUDA
- How to use cross_val_score with random_state
- How to measure overfitting when train and validati
- McNemar's test in Python and comparison of cla
- How to disable keras warnings?
- TensorFlow Eager Mode: How to restore a model from
You can use Bayesian optimization (full disclosure, I've contributed to this package) or Hyperband. Both of these methods attempt to automate the hyperparameter tuning stage. Hyperband is supposedly the state of the art in this space. Hyperband is the only parameter-free method that I've heard of other than random search. You can also look into using reinforcement learning to learn the optimal hyperparameters if you prefer.
The simplest parameter-free way to do black box optimisation is random search, and it will explore high dimensional spaces faster than a grid search. There are papers on this but tl;dr with random search you get different values on every dimension each time, while with grid search you don't.
Bayesian optimisation has good theoretical guarantees (despite the approximations), and implementations like Spearmint can wrap any script you have; there are hyperparameters but users don't see them in practice. Hyperband got a lot of attention by showing faster convergence than Naive Bayesian optimisation. It was able to do this by running different networks for different numbers of iterations, and Bayesian optimisation doesn't support that naively. While it is possible to do better with a Bayesian optimisation algorithm that can take this into account, such as FABOLAS, in practice hyperband is so simple you're probably better using it and watching it to tune the search space at intervals.
Many researchers use RayTune. It's a scalable hyperparameter tuning framework, specifically for deep learning. You can easily use it with any deep learning framework (2 lines of code below), and it provides most state-of-the-art algorithms, including HyperBand, Population-based Training, Bayesian Optimization, and BOHB.
[Disclaimer: I contribute actively to this project!]
What I found is following:
More young projects:
UPDATE something new:
Ax: Adaptive Experimentation Platform by facebook
BoTorch: Bayesian Optimization in PyTorch
Also, I found a useful table at post by @Richard Liaw: