{"id":13570019,"url":"https://github.com/keras-team/keras-tuner","last_synced_at":"2025-05-15T00:00:27.340Z","repository":{"id":38272160,"uuid":"190658443","full_name":"keras-team/keras-tuner","owner":"keras-team","description":"A Hyperparameter Tuning Library for Keras","archived":false,"fork":false,"pushed_at":"2024-12-01T18:14:29.000Z","size":2024,"stargazers_count":2880,"open_issues_count":231,"forks_count":398,"subscribers_count":58,"default_branch":"master","last_synced_at":"2025-05-07T23:35:43.279Z","etag":null,"topics":["automl","deep-learning","hyperparameter-optimization","keras","machine-learning","tensorflow"],"latest_commit_sha":null,"homepage":"https://keras.io/keras_tuner/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keras-team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-06T22:38:21.000Z","updated_at":"2025-05-06T22:40:28.000Z","dependencies_parsed_at":"2024-01-15T18:46:15.722Z","dependency_job_id":"e7f6c36c-f58d-4c73-8e2f-fbe2ae7e3bcf","html_url":"https://github.com/keras-team/keras-tuner","commit_stats":{"total_commits":977,"total_committers":70,"mean_commits":"13.957142857142857","dds":0.7809621289662232,"last_synced_commit":"417e5b5e8df924d428a3c64007f3ed47bd4c7026"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keras-team%2Fkeras-tuner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keras-team%2Fkeras-tuner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keras-team%2Fkeras-tuner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keras-team%2Fkeras-tuner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keras-team","download_url":"https://codeload.github.com/keras-team/keras-tuner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254249199,"owners_count":22039029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automl","deep-learning","hyperparameter-optimization","keras","machine-learning","tensorflow"],"created_at":"2024-08-01T14:00:47.292Z","updated_at":"2025-05-15T00:00:27.278Z","avatar_url":"https://github.com/keras-team.png","language":"Python","funding_links":[],"categories":["Python","AutoML","参数优化","Profiling","Deep Learning Framework","Scheduling","Tools and projects","超参数优化和AutoML","Uncategorized","Other 💛💛💛💛💛\u003ca name=\"Other\" /\u003e","Libraries","Hyperparameter Tuning","Core Libraries","🤖 AI \u0026 Machine Learning"],"sub_categories":["Profiling","Auto ML \u0026 Hyperparameter Optimization","LLM","Uncategorized","General-Purpose Machine Learning","AutoML"],"readme":"# KerasTuner\n\n[![](https://github.com/keras-team/keras-tuner/workflows/Tests/badge.svg?branch=master)](https://github.com/keras-team/keras-tuner/actions?query=workflow%3ATests+branch%3Amaster)\n[![codecov](https://codecov.io/gh/keras-team/keras-tuner/branch/master/graph/badge.svg)](https://codecov.io/gh/keras-team/keras-tuner)\n[![PyPI version](https://badge.fury.io/py/keras-tuner.svg)](https://badge.fury.io/py/keras-tuner)\n\nKerasTuner is an easy-to-use, scalable hyperparameter optimization framework\nthat solves the pain points of hyperparameter search. Easily configure your\nsearch space with a define-by-run syntax, then leverage one of the available\nsearch algorithms to find the best hyperparameter values for your models.\nKerasTuner comes with Bayesian Optimization, Hyperband, and Random Search algorithms\nbuilt-in, and is also designed to be easy for researchers to extend in order to\nexperiment with new search algorithms.\n\nOfficial Website: [https://keras.io/keras_tuner/](https://keras.io/keras_tuner/)\n\n## Quick links\n\n* [Getting started with KerasTuner](https://keras.io/guides/keras_tuner/getting_started)\n* [KerasTuner developer guides](https://keras.io/guides/keras_tuner/)\n* [KerasTuner API reference](https://keras.io/api/keras_tuner/)\n\n\n## Installation\n\nKerasTuner requires **Python 3.8+** and **TensorFlow 2.0+**.\n\nInstall the latest release:\n\n```\npip install keras-tuner\n```\n\nYou can also check out other versions in our\n[GitHub repository](https://github.com/keras-team/keras-tuner).\n\n\n## Quick introduction\n\nImport KerasTuner and TensorFlow:\n\n```python\nimport keras_tuner\nfrom tensorflow import keras\n```\n\nWrite a function that creates and returns a Keras model.\nUse the `hp` argument to define the hyperparameters during model creation.\n\n```python\ndef build_model(hp):\n  model = keras.Sequential()\n  model.add(keras.layers.Dense(\n      hp.Choice('units', [8, 16, 32]),\n      activation='relu'))\n  model.add(keras.layers.Dense(1, activation='relu'))\n  model.compile(loss='mse')\n  return model\n```\n\nInitialize a tuner (here, `RandomSearch`).\nWe use `objective` to specify the objective to select the best models,\nand we use `max_trials` to specify the number of different models to try.\n\n```python\ntuner = keras_tuner.RandomSearch(\n    build_model,\n    objective='val_loss',\n    max_trials=5)\n```\n\nStart the search and get the best model:\n\n```python\ntuner.search(x_train, y_train, epochs=5, validation_data=(x_val, y_val))\nbest_model = tuner.get_best_models()[0]\n```\n\nTo learn more about KerasTuner, check out [this starter guide](https://keras.io/guides/keras_tuner/getting_started/).\n\n## Contributing Guide\n\nPlease refer to the [CONTRIBUTING.md](https://github.com/keras-team/keras-tuner/blob/master/CONTRIBUTING.md) for the contributing guide.\n\nThank all the contributors!\n\n[![The contributors](https://raw.githubusercontent.com/keras-team/keras-tuner/master/docs/contributors.svg)](https://github.com/keras-team/keras-tuner/graphs/contributors)\n\n## Community\n\nAsk your questions on our [GitHub Discussions](https://github.com/keras-team/keras-tuner/discussions).\n\n## Citing KerasTuner\n\nIf KerasTuner helps your research, we appreciate your citations.\nHere is the BibTeX entry:\n\n```bibtex\n@misc{omalley2019kerastuner,\n\ttitle        = {KerasTuner},\n\tauthor       = {O'Malley, Tom and Bursztein, Elie and Long, James and Chollet, Fran\\c{c}ois and Jin, Haifeng and Invernizzi, Luca and others},\n\tyear         = 2019,\n\thowpublished = {\\url{https://github.com/keras-team/keras-tuner}}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeras-team%2Fkeras-tuner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeras-team%2Fkeras-tuner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeras-team%2Fkeras-tuner/lists"}