To fit images file to an autokeras image classifier

232 Views Asked by At

I am trying to fit images file to an autokeras image classifier. Code I am using is given below,

import autokeras as ak
import os
import numpy as np
from sklearn.model_selection import train_test_split
path= '/Users/Downloads/business_cards/Canon/'
X_data = os.listdir(path)
training, test = train_test_split(X_data, test_size=0.20, random_state=42)
x= np.array([training])
print(x.shape)
clf = ak.ImageClassifier(overwrite=True, max_trials=1)
clf.fit(x,epochs=1)

But it gives me the following error, AttributeError: 'NoneType' object has no attribute 'shape'

Could someone please help me with this.

0

There are 0 best solutions below