question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Specify hyperparameter ranges for blocks

See original GitHub issue

Feature Description

We want to enable the users to specify the value ranges for any argument in the blocks. The following code example shows a typical use case. The users can specify the number of units in a DenseBlock to be either 10 or 20.

Code Example

import autokeras as ak
from kerastuner.engine.hyperparameters import Choice

input_node = ak.ImageInput()
output_node = ak.DenseBlock(num_units=Choice("num_units", [10, 20]))(input_node)
output_node = ak.ClassificationHead()(output_node)
model = ak.AutoModel(input_node, output_node)

Note

Each pull request should only change one hyperparameter in one of the blocks.

Solution

Example pull requests are #1419 #1425 . Here are the steps to follow:

  1. You can just change any other argument in any other block supported by AutoKeras, as shown here.
  2. Change the docstring. example
  3. Make sure you imported the module. from kerastuner.engine import hyperparameters.
  4. Change the typing of the argument. example
  5. Change the saving mechanism to serialized objects. example
  6. Change the loading mechanism to deserialized objects. example
  7. Change how we initialize the hyperparameter to self. example Copy from where it is originally defined. example
  8. Change how we use it. example

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:18 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
haifeng-jincommented, Apr 24, 2022

@NickSmyr The PR is merged. Thanks for your contribution! AutoKeras will have another release soon before TF 2.9.0 stable release. Your commit will be in it.

0reactions
Neproxxcommented, Apr 28, 2022

@haifeng-jin yes, that was the last PR from our side.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Define Hyperparameter Ranges - Amazon SageMaker
This guide shows how to use SageMaker APIs to define hyperparameter ranges. It also provides a list of hyperparameter scaling types that you...
Read more >
HyperparameterTuner — sagemaker 2.122.0 documentation
Defines interaction with Amazon SageMaker hyperparameter tuning jobs. ... These parameter ranges can be one of three types: Continuous, Integer, ...
Read more >
Overview of hyperparameter tuning | AI Platform Training
When you configure a training job with hyperparameter tuning, you define each hyperparameter to tune, its type, and the range of values to...
Read more >
Ray Tune FAQ — Ray 2.2.0 - the Ray documentation
How do I choose hyperparameter ranges?# ... A good start is to look at the papers that introduced the algorithms, and also to...
Read more >
Best Practices for Hyperparameter Tuning - Amazon SageMaker
The range of values for hyperparameters that you choose to search can significantly affect the success of hyperparameter optimization. Although you might want ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found