title: AttributeError: 'Tensor' object has no attribute 'numpy
body: <p>I try to using autokeras for image classification model
  when I fit my data this error happen</p>
  
  <pre><code>DATADIR = r"C:\Users\angesu\Desktop\DOCUMENT_DATA"
  
  CATEGORIES = ["resume","transcript","certificate"]
  IMG_SIZE = 250
  
  for category in CATEGORIES :
      path = os.path.join(DATADIR, category)
      for img in os.listdir(path):
          img_array = cv2.imread(os.path.join(path, img), cv2.IMREAD_GRAYSCALE)
  
  training_data = []
  def create_training_data():
      for category in CATEGORIES :
          path = os.path.join(DATADIR, category)
          class_num = CATEGORIES.index(category)
          for img in os.listdir(path):
              try :
                  img_array = cv2.imread(os.path.join(path, img), cv2.IMREAD_GRAYSCALE)
                  new_array = cv2.resize(img_array, (IMG_SIZE, IMG_SIZE))
                  training_data.append([new_array, class_num])
              except Exception as e:
                  pass
  create_training_data()
  random.shuffle(training_data)
  
  X = [] #features
  y = [] #labels
  for features, label in training_data:
      X.append(features)
      y.append(label)
  
  X = np.asarray(X).reshape(-1, IMG_SIZE, IMG_SIZE, 1)
  
  clf = ak.ImageClassifier(max_trials=10)
  clf.fit(X,y,validation_split=0.1)
  
  def prepare(file):
      IMG_SIZE = 250
      img_array = cv2.imread(file, cv2.IMREAD_GRAYSCALE)
      new_array = cv2.resize(img_array, (IMG_SIZE, IMG_SIZE))
      return new_array.reshape(-1, IMG_SIZE, IMG_SIZE, 1)
  
  path = r"C:\Users\angesu\Downloads\Garn-Certificate-4.jpg"
  
  predicted_y = clf.predict(prepare(path))
  
  print(clf.evaluate(test_set))
  
  </code></pre>
  
  <p>I don't know how to fix this problem 
  I'm trying to use tf.data.Dataset.from_tensor_slices() but this error still show
  I'm google this error but I don't understand anything
  The error is in clf.fit(X,y,validation_split=0.1)</p>
  
  <p>Error message</p>
  
  <pre><code>---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-11-b327f1f23808&gt; in &lt;module&gt;
        1 clf = ak.ImageClassifier(max_trials=10)
        2 # Feed the tensorflow Dataset to the classifier.
  ----&gt; 3 clf.fit(X,Y,validation_split=0.1)
        4 # Predict with the best model.
        5 
  
  C:\ProgramData\Anaconda3\lib\site-packages\autokeras\task.py in fit(self, x, y, epochs, callbacks, validation_split, validation_data, **kwargs)
      114                     validation_split=validation_split,
      115                     validation_data=validation_data,
  --&gt; 116                     **kwargs)
      117 
      118 
  
  C:\ProgramData\Anaconda3\lib\site-packages\autokeras\auto_model.py in fit(self, x, y, epochs, callbacks, validation_split, validation_data, **kwargs)
      156             y=y,
      157             validation_data=validation_data,
  --&gt; 158             validation_split=validation_split)
      159 
      160         # Initialize the hyper_graph.
  
  C:\ProgramData\Anaconda3\lib\site-packages\autokeras\auto_model.py in _prepare_data(self, x, y, validation_data, validation_split)
      259         if validation_data is None and validation_split:
      260             self._split_dataset = True
  --&gt; 261             dataset, validation_data = utils.split_dataset(dataset, validation_split)
      262         return dataset, validation_data
      263 
  
  C:\ProgramData\Anaconda3\lib\site-packages\autokeras\utils.py in split_dataset(dataset, validation_split)
       64         A tuple of two tf.data.Dataset. The training set and the validation set.
       65     """
  ---&gt; 66     num_instances = dataset.reduce(np.int64(0), lambda x, _: x + 1).numpy()
       67     if num_instances &lt; 2:
       68         raise ValueError('The dataset should at least contain 2 '
  
  AttributeError: 'Tensor' object has no attribute 'numpy'
  </code></pre>