--- id: keras-tuner version: "1.4.8" license: Apache License 2.0 license_treatment: permissive maintenance: aging --- # keras-tuner — A Hyperparameter Tuning Library for Keras License: permissive · Maintenance: aging · Downloads: 180.9K/mo ## What it is and what it does KerasTuner is a hyperparameter optimization framework designed to automate the search for optimal model configurations in Keras. It provides a define-by-run syntax where you write a function that builds your model and uses the `hp` argument to declare which hyperparameters to tune, then delegates the search to one of several built-in algorithms: Bayesian Optimization, Hyperband, or Random Search. The framework handles the trial management, evaluation, and model selection, returning the best-performing model based on your chosen objective metric. The package integrates with keras as its primary dependency and relies on packaging, requests, kt-legacy, grpcio, and protobuf for configuration management, API communication, and serialization. KerasTuner is intended for researchers and practitioners who need to systematically explore hyperparameter spaces without manually implementing search logic, and it is designed to be extensible for experimenting with custom search algorithms. Use it for: - Automatically find optimal layer sizes, learning rates, and activation functions for a model without manual trial-and-error. - Compare multiple search algorithms (Bayesian, Hyperband, Random) on the same model to identify which converges fastest. - Scale hyperparameter search across distributed systems using the framework's built-in support for parallel trials. - Experiment with new search algorithms by extending KerasTuner's base classes for research or domain-specific optimization. - Reduce model development time by systematically tuning a large number of hyperparameters in a single reproducible workflow. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. KerasTuner automates hyperparameter optimization for Keras models using built-in search algorithms (Bayesian Optimization, Hyperband, Random Search) and a define-by-run configuration syntax. Yes, with conditions. KerasTuner is a permissively licensed tool for automating hyperparameter search in Keras models, with low install friction and no known vulnerabilities. However, its maintenance status is aging (276 days since last release), so verify compatibility with your keras version and check for any recent issues before committing to production workflows. It is well-suited for research, prototyping, and systematic tuning tasks. ## Install pip install keras-tuner uv add keras-tuner poetry add keras-tuner ## Installing keras-tuner Before you install: Low install friction with a pure-Python wheel. The package depends on keras, packaging, requests, kt-legacy, grpcio, and protobuf. Maintenance status is aging—last release was 276 days ago, though the repository remains active with a recent commit on 2025-12-01. License in practice: Licensed under Apache License 2.0 (permissive), so you can use, modify, and distribute the package freely in commercial and private projects without restriction. Quickstart: pip install keras-tuner import keras_tuner from keras import Sequential, layers def build_model(hp): model = Sequential() model.add(layers.Dense(hp.Choice('units', [8, 16, 32]), activation='relu')) model.add(layers.Dense(1, activation='relu')) model.compile(loss='mse') return model tuner = keras_tuner.RandomSearch(build_model, objective='val_loss', max_trials=5) tuner.search(x_train, y_train, epochs=5, validation_data=(x_val, y_val)) best_model = tuner.get_best_models()[0] Requires Python 3.8+ and a compatible version of keras. Verify before relying: - Whether aging maintenance status (276 days since last release) affects stability or feature completeness. - Performance characteristics and scalability limits for large hyperparameter search spaces. - Specific keras and protobuf version compatibility requirements. ## Package facts - License: Apache License 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 180.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags hyperparameter tuning keras, neural network hyperparameter optimization, bayesian optimization keras models, automated model tuning, hyperband search algorithm, keras hyperparameter search, model parameter optimization framework, hyperparameter-optimization, keras-integration, neural-architecture-search [View on SkillFed](https://skillfed.io/packages/keras-tuner) · [View on PyPI](https://pypi.org/project/keras-tuner/)