Customizing keras-tuner for flexibility and maintainability
Let's get right into coding! We will import all necessary libraries, internal code, and specify callbacks, metrics, inputs, and loss function which will be passed to our custom HyperModel. Hypermodel is a class that allow us to use hp arguments to define hyperparameters. After initializing hypermodel, reassign directory name get_project_name()(where hpo trials will be saved) if already exists since if you run with already existing directory name keras tuner does not run properly. Another way to avoid this is to add overwrite True parameter when instantiating kt.RandomSearch.
Jul-5-2022, 23:56:45 GMT
- Technology: