Customizing the model search space
We can customize the model's search to restrict the search space by using AutoModel
instead of TextClassifier
, for example, by setting TextBlock
for some specific configurations.
In the following code snippet, we're telling AutoKeras to only generate models that use 'ngram'
to vectorize the sentences. Remember that if we do not specify any of these arguments, AutoKeras will automatically try all the possible combinations until the number reaches the max_trial
parameter:
input_node = ak.TextInput() output_node = ak.TextBlock(block_type="ngram")(input_node) output_node = ak.ClassificationHead()(output_node) clf = ak.AutoModel(inputs=input_node, outputs=output_node, overwrite=True, max_trials...