Skip to content

Base Class

[source]

Node

autokeras.Node(**kwargs)

The nodes in a network connecting the blocks.


[source]

Block

autokeras.Block(**kwargs)

The base class for different Block.

The Block can be connected together to build the search space for an AutoModel. Notably, many args in the init function are defaults to be a tunable variable when not specified by the user.


[source]

build

Block.build(hp, inputs=None)

Build the Block into a real Keras Model.

The subclasses should override this function and return the output node.

Arguments

  • hp: HyperParameters. The hyperparameters for building the model.
  • inputs: A list of input node(s).

[source]

autokeras.Head(loss=None, metrics=None, **kwargs)

Base class for the heads, e.g. classification, regression.

Arguments

  • loss str | Callable | tensorflow.keras.losses.Loss | None: A Keras loss function. Defaults to None. If None, the loss will be inferred from the AutoModel.
  • metrics List[str | Callable | tensorflow.keras.metrics.Metric] | List[List[str | Callable | tensorflow.keras.metrics.Metric]] | Dict[str, str | Callable | tensorflow.keras.metrics.Metric] | None: A list of Keras metrics. Defaults to None. If None, the metrics will be inferred from the AutoModel.