Block

[source]

ImageBlock

autokeras.hypermodel.hyperblock.ImageBlock(block_type=None, normalize=True, augment=True, seed=None)

HyperBlock for image data.

The image blocks is a block choosing from ResNetBlock, XceptionBlock, ConvBlock, which is controlled by a hyperparameter, 'block_type'.

Arguments

  • block_type: String. 'resnet', 'xception', 'vanilla'. The type of HyperBlock to use. If unspecified, it will be tuned automatically.
  • normalize: Boolean. Whether to channel-wise normalize the images. If unspecified, it will be tuned automatically.
  • augment: Boolean. Whether to do image augmentation. If unspecified, it will be tuned automatically.

[source]

TextBlock

autokeras.hypermodel.hyperblock.TextBlock(vectorizer=None, pretraining=None)

[source]

StructuredDataBlock

autokeras.hypermodel.block.StructuredDataBlock(name=None)

[source]

ResNetBlock

autokeras.hypermodel.block.ResNetBlock(version=None, pooling=None)

Block for ResNet.

Arguments

  • version: String. 'v1', 'v2' or 'next'. The type of ResNet to use. If left unspecified, it will be tuned automatically.
  • pooling: String. 'avg', 'max'. The type of pooling layer to use. If left unspecified, it will be tuned automatically.

[source]

XceptionBlock

autokeras.hypermodel.block.XceptionBlock(activation=None, initial_strides=None, num_residual_blocks=None, pooling=None)

XceptionBlock.

An Xception structure, used for specifying your model with specific datasets.

The original Xception architecture is from https://arxiv.org/abs/1610.02357. The data first goes through the entry flow, then through the middle flow which is repeated eight times, and finally through the exit flow.

This XceptionBlock returns a similar architecture as Xception except without the last (optional) fully connected layer(s) and logistic regression. The size of this architecture could be decided by HyperParameters, to get an architecture with a half, an identical, or a double size of the original one.

Arguments

  • activation: String. 'selu' or 'relu'. If left unspecified, it will be tuned automatically.
  • initial_strides: Int. If left unspecified, it will be tuned automatically.
  • num_residual_blocks: Int. If left unspecified, it will be tuned automatically.
  • pooling: String. 'ave', 'flatten', or 'max'. If left unspecified, it will be tuned automatically.

[source]

ConvBlock

autokeras.hypermodel.block.ConvBlock(kernel_size=None, num_blocks=None, separable=None)

Block for vanilla ConvNets.

Arguments

  • kernel_size: Int. If left unspecified, it will be tuned automatically.
  • num_blocks: Int. The number of conv blocks. If left unspecified, it will be tuned automatically.
  • separable: Boolean. Whether to use separable conv layers. If left unspecified, it will be tuned automatically.

[source]

RNNBlock

autokeras.hypermodel.block.RNNBlock(return_sequences=False, bidirectional=None, num_layers=None, layer_type=None)

An RNN Block.

Arguments

  • return_sequences: Boolean. Whether to return the last output in the output sequence, or the full sequence. Defaults to False.
  • bidirectional: Boolean. Bidirectional RNN. If left unspecified, it will be tuned automatically.
  • num_layers: Int. The number of layers in RNN. If left unspecified, it will be tuned automatically.
  • layer_type: String. 'gru' or 'lstm'. If left unspecified, it will be tuned automatically.

[source]

Merge

autokeras.hypermodel.block.Merge(merge_type=None)

Merge block to merge multiple nodes into one.

Arguments

  • merge_type: String. 'add' or 'concatenate'. If left unspecified, it will be tuned automatically.