A simple wrapper that combines Keras and Hyperopt for convenient hyperparameter optimization in deep learning models.
Hyperas is a lightweight Python library that bridges Keras and Hyperopt, enabling fast hyperparameter tuning for deep learning models. It allows users to define Keras models as usual and use simple template notation with double curly brackets to specify parameter ranges for optimization, without requiring them to learn Hyperopt's complex syntax.
Data scientists and deep learning practitioners who use Keras for model building and want to perform hyperparameter optimization with minimal changes to their existing workflows.
Developers choose Hyperas because it simplifies hyperparameter tuning by integrating Hyperopt's powerful algorithms directly into Keras code through an intuitive template system, reducing the learning curve and setup time compared to using Hyperopt directly.
Keras + Hyperopt: A very simple wrapper for convenient hyperparameter optimization
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses double curly brackets like `{{uniform(0, 1)}}` to define hyperparameters directly in Keras code, eliminating the need to learn Hyperopt's complex syntax and speeding up experimentation.
Automatically translates templates into Hyperopt's search space, leveraging algorithms like TPE for efficient optimization, as shown in examples with `optim.minimize` and `algo=tpe.suggest`.
Enforces separate `data()` and `create_model()` functions, promoting maintainable code and allowing conditional layers, demonstrated in the complete example with if-else logic for layer addition.
Supports parallel trials via MongoDB for scalable hyperparameter searches across multiple machines, detailed in the FAQ with steps for setting up hyperopt-mongo-worker.
Exclusively designed for Keras, making it useless for projects using other frameworks like PyTorch, which limits its relevance in a diverse deep learning landscape.
Relies on parsing code into temporary files, leading to common errors like `TypeError: require string label` if models aren't properly wrapped, adding debugging overhead.
Requires specific versions like `networkx==1.11` to avoid `'generator' object is not subscriptable` errors, indicating poor maintenance and potential conflicts with other libraries.
The FAQ admits that for more complex scenarios, users might need to switch to Hyperopt directly, as Hyperas is a convenience wrapper with constraints on data loading and model adaptation.