Skip to content

AttributeError: 'DenseBlock' object has no attribute 'get_adapter' #1487

Answered by KiLJ4EdeN
yurimarimo asked this question in Q&A
Discussion options

You must be logged in to vote

This is my code.

import autokeras as ak

input_node = ak.Input()
gru_node = ak.RNNBlock(return_sequences=True, layer_type="gru")(input_node)
output_node = ak.DenseBlock()(gru_node)

auto_model = ak.AutoModel(
    inputs=input_node, 
    outputs=output_node,
    overwrite=True,
    max_trials=2)

auto_model.fit(X_train, y_train, batch_size=100, epochs=1, validation_split=0.1)

When I tried, I got the following error.

AttributeError: 'DenseBlock' object has no attribute 'get_adapter'

I don't know how to solve this problem, so I hope you can tell me something.

Thank you.

Hello I reproduced your error with random vectors,

The error can be solved by adding a head to the end of the network, …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by yurimarimo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants