title: AttributeError: 'Sequential' object has no attribute 'predict_proba'
body: <p>predict_proba returns the error in the neural network</p>
  <p>i saw the example on this link <a href="https://machinelearningmastery.com/how-to-make-classification-and-regression-predictions-for-deep-learning-models-in-keras/" rel="nofollow noreferrer">https://machinelearningmastery.com/how-to-make-classification-and-regression-predictions-for-deep-learning-models-in-keras/</a></p>
  <p><a href="https://faroit.com/keras-docs/1.0.0/models/sequential/#the-sequential-model-api" rel="nofollow noreferrer">https://faroit.com/keras-docs/1.0.0/models/sequential/#the-sequential-model-api</a></p>
  <p>I am using Tensorflow Version: 2.6.0</p>
  <p><strong>Code:</strong></p>
  <pre><code>#creating the object (Initializing the ANN)
  import tensorflow as tf
  from tensorflow import keras
  LAYERS = [
           tf.keras.layers.Dense(50, activation=&quot;relu&quot;, input_shape=X_train.shape[1:]),
           tf.keras.layers.LeakyReLU(),
           tf.keras.layers.Dense(25, activation=&quot;relu&quot;),
           tf.keras.layers.Dense(10, activation=&quot;relu&quot;),
           tf.keras.layers.Dense(5, activation=&quot;relu&quot;),
           tf.keras.layers.Flatten(),
           tf.keras.layers.Dense(1, activation='sigmoid')
  ]
  
  LOSS = &quot;binary_crossentropy&quot;
  OPTIMIZER = tf.keras.optimizers.Adam(learning_rate=1e-3)
  
  model_cEXT = tf.keras.models.Sequential(LAYERS)
  model_cEXT.compile(loss=LOSS , optimizer=OPTIMIZER, metrics=['accuracy'])
  
  EPOCHS = 100
  
  checkpoint_cb = tf.keras.callbacks.ModelCheckpoint(&quot;model_cEXT.h5&quot;, save_best_only=True)
  early_stopping_cb = tf.keras.callbacks.EarlyStopping(patience=10, restore_best_weights=True)
  tensorboard_cb = tf.keras.callbacks.TensorBoard(log_dir=&quot;logs&quot;)
  CALLBACKS = [checkpoint_cb, early_stopping_cb, tensorboard_cb]
  
  model_cEXT.fit(X_train, y_train['cEXT'], epochs = EPOCHS, validation_data=(X_test, y_test['cEXT']), callbacks = CALLBACKS)
  
  model_cEXT.predict_proba(X_test)
  </code></pre>
  <p><strong>Error:</strong></p>
  <pre><code>---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-72-8f06353cf345&gt; in &lt;module&gt;()
  ----&gt; 1 model_cEXT.predict_proba(X_test)
  
  AttributeError: 'Sequential' object has no attribute 'predict_proba'
  </code></pre>
  <p><strong>Edit:</strong>
  i need sklearn's like predict_proba output it is needed for visualization</p>
  <pre><code>skplt.metrics.plot_precision_recall_curve(y_test['cEXT'].values, y_prob)
  plt.title('Precision-Recall Curve - cEXT')
  plt.show()
  </code></pre>