title: Keras AttributeError: 'Sequential' object has no attribute 'predict_classes'
body: <p>Im attempting to find model performance metrics (F1 score, accuracy, recall) following this guide <a href="https://machinelearningmastery.com/how-to-calculate-precision-recall-f1-and-more-for-deep-learning-models/" rel="noreferrer">https://machinelearningmastery.com/how-to-calculate-precision-recall-f1-and-more-for-deep-learning-models/</a></p>
  <p>This exact code was working a few months ago but now returning all sorts of errors, very confusing since i havent changed one character of this code. Maybe a package update has changed things?</p>
  <p>I fit the sequential model with model.fit, then used model.evaluate to find test accuracy. Now i am attempting to use model.predict_classes to make class predictions (model is a multi-class classifier). Code shown below:</p>
  <pre><code>model = Sequential()
  model.add(Dense(24, input_dim=13, activation='relu'))
  model.add(Dense(18, activation='relu'))
  model.add(Dense(6, activation='softmax'))
  model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])
  
  -
  
  history = model.fit(X_train, y_train, batch_size = 256, epochs = 10, verbose = 2, validation_split = 0.2)
  
  -
  
  score, acc = model.evaluate(X_test, y_test,verbose=2, batch_size= 256)
  print('test accuracy:', acc)
  
  -
  
  yhat_classes = model.predict_classes(X_test)
   
  </code></pre>
  <p>last line returns error &quot;AttributeError: 'Sequential' object has no attribute 'predict_classes'&quot;</p>
  <p>This exact code was working not long ago so struggling a bit, thanks for any help</p>