class_docstr: Makes any ``tf.keras.models.Sequential`` object compatible with :py:class:`CleanLearning <cleanlab.classification.CleanLearning>` and sklearn.
  
  `KerasWrapperSequential` is instantiated in the same way as a keras ``Sequential``  object, except for optional extra `compile_kwargs` argument.
  Just instantiate this object in the same way as your ``tf.keras.models.Sequential`` object (rather than passing in an existing ``Sequential`` object).
  The instance methods of this class work in the same way as those of any keras ``Sequential`` object, see the `Keras documentation <https://keras.io/>`_ for details.
  
  Parameters
  ----------
  layers: list
      A list containing the layers to add to the keras ``Sequential`` model (same as for ``tf.keras.models.Sequential``).
  
  name: str, default = None
      Name for the Keras model (same as for ``tf.keras.models.Sequential``).
  
  compile_kwargs: dict, default = {"loss": tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True)}
      Dict of optional keyword arguments to pass into ``model.compile()`` for declaring loss, metrics, optimizer, etc.
class_docstr_tok: ["Makes","any","``","tf.keras.models.Sequential","``","object","compatible","with",":","py",":","class",":","`","CleanLearning","<","cleanlab.classification.CleanLearning",">","`","and","sklearn",".","`","KerasWrapperSequential","`","is","instantiated","in","the","same","way","as","a","keras","``","Sequential","``","object",",","except","for","optional","extra","`","compile_kwargs","`","argument",".","Just","instantiate","this","object","in","the","same","way","as","your","``","tf.keras.models.Sequential","``","object","(","rather","than","passing","in","an","existing","``","Sequential","``","object",")",".","The","instance","methods","of","this","class","work","in","the","same","way","as","those","of","any","keras","``","Sequential","``","object",",","see","the","`","Keras","documentation","<","https",":","\/\/keras.io\/",">","`","_","for","details",".","Parameters","--","--","--","--","--","layers",":","list","A","list","containing","the","layers","to","add","to","the","keras","``","Sequential","``","model","(","same","as","for","``","tf.keras.models.Sequential","``",")",".","name",":","str",",","default","=","None","Name","for","the","Keras","model","(","same","as","for","``","tf.keras.models.Sequential","``",")",".","compile_kwargs",":","dict",",","default","=","{","``","loss","''",":","tf.keras.losses.SparseCategoricalCrossentropy","(","from_logits=True",")","}","Dict","of","optional","keyword","arguments","to","pass","into","``","model.compile","(",")","``","for","declaring","loss",",","metrics",",","optimizer",",","etc","."]
docstr: Predict class probabilities for all classes using the wrapped Keras model.
  Set extra argument `apply_softmax` to True to indicate your network only outputs logits not probabilities.
  
  Parameters
  ----------
  X : tf.Dataset or np.array or pd.DataFrame
      Data in the same format as the original ``X`` provided to ``fit()``.
docstr_tok: ["Predict","class","probabilities","for","all","classes","using","the","wrapped","Keras","model",".","Set","extra","argument","`","apply_softmax","`","to","True","to","indicate","your","network","only","outputs","logits","not","probabilities",".","Parameters","--","--","--","--","--","X",":","tf.Dataset","or","np.array","or","pd.DataFrame","Data","in","the","same","format","as","the","original","``","X","``","provided","to","``","fit","(",")","``","."]
code: def predict_proba(self, X, *, apply_softmax=True, **kwargs):
      """Predict class probabilities for all classes using the wrapped Keras model.
      Set extra argument `apply_softmax` to True to indicate your network only outputs logits not probabilities.
  
      Parameters
      ----------
      X : tf.Dataset or np.array or pd.DataFrame
          Data in the same format as the original ``X`` provided to ``fit()``.
      """
      if self.net is None:
          raise ValueError("must call fit() before predict()")
      pred_probs = self.net.predict(X, **kwargs)
      if apply_softmax:
          pred_probs = tf.nn.softmax(pred_probs, axis=1)
      return pred_probs
  
imports: import tensorflow
  import keras
  import numpy
  from typing import Callable, Optional
label_desc: Use image node_id 5 for calling the KerasWrapperSequential obj's underlying member method code with example usage: obj.predict_proba(X) and returns: pred_probs