Autokeras multiple Inputs prediction fails

288 views Asked by At

I have the follwing setup for autokeras for training a model with a TextInput and a StructuredDataInput

model=ak.AutoModel(
inputs=[ak.TextInput(),ak.StructuredDataInput(column_names=["token_ratio","length_ratio","duplicate_tokens","contains_size"])],
outputs=ak.ClassificationHead(num_classes=2,loss='binary_crossentropy'),
    max_trials=1,overwrite=True
)
model.fit(
  [train["title"].to_numpy(),train[["token_ratio","length_ratio","duplicate_tokens","contains_size"]].to_numpy()],
    [train["label"]],epochs=1
)
model.predict([sample["title"].to_numpy(),sample[["token_ratio","length_ratio","duplicate_tokens","contains_size"]].to_numpy()])

The training works perfect and it results in a model Keras model. but when I call the predict function the follwoing Error occurs:

ValueError: Failed to find data adapter that can handle input: (<class 'tuple'> containing values of types {"<class 'tensorflow.python.data.ops.dataset_ops.MapDataset'>"}), <class 'NoneType'>

Suggestions why this is wrong?

0

There are 0 answers