class_docstr: Parent class for deepchem Tensorflow models.
  
  Classifier:
    n_classes
  
  Has the following attributes:
  
    placeholder_root: String placeholder prefix, used to create
      placeholder_scope.
  
  Generic base class for defining, training, and evaluating TensorflowGraphs.
  
  Subclasses must implement the following methods:
    build
    add_output_ops
    add_training_cost 
  
  Args:
    train: If True, model is in training mode.
    logdir: Directory for output files.
class_docstr_tok: ["Parent","class","for","deepchem","Tensorflow","models",".","Classifier",":","n_classes","Has","the","following","attributes",":","placeholder_root",":","String","placeholder","prefix",",","used","to","create","placeholder_scope",".","Generic","base","class","for","defining",",","training",",","and","evaluating","TensorflowGraphs",".","Subclasses","must","implement","the","following","methods",":","build","add_output_ops","add_training_cost","Args",":","train",":","If","True",",","model","is","in","training","mode",".","logdir",":","Directory","for","output","files","."]
docstr: TODO: Do transformers even make sense here?
  
  Returns:
    y_pred: numpy ndarray of shape (n_samples, n_classes*n_tasks)
docstr_tok: ["TODO",":","Do","transformers","even","make","sense","here","?","Returns",":","y_pred",":","numpy","ndarray","of","shape","(","n_samples",",","n_classes","*","n_tasks",")"]
code: def predict_proba(self, dataset, transformers=[], n_classes=2):
      """
      TODO: Do transformers even make sense here?
  
      Returns:
        y_pred: numpy ndarray of shape (n_samples, n_classes*n_tasks)
      """
      y_preds = []
      n_tasks = self.get_num_tasks()
  
      for X_batch, y_batch, w_batch, ids_batch in dataset.iterbatches(
          self.batch_size, deterministic=True
      ):
          n_samples = len(X_batch)
          y_pred_batch = self.predict_proba_on_batch(X_batch)
          y_pred_batch = y_pred_batch[:n_samples]
          y_pred_batch = np.reshape(
              y_pred_batch, (n_samples, n_tasks, n_classes)
          )
          y_pred_batch = undo_transforms(y_pred_batch, transformers)
          y_preds.append(y_pred_batch)
      y_pred = np.vstack(y_preds)
      # The iterbatches does padding with zero-weight examples on the last batch.
      # Remove padded examples.
      n_samples = len(dataset)
      y_pred = y_pred[:n_samples]
      y_pred = np.reshape(y_pred, (n_samples, n_tasks, n_classes))
      return y_pred
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import unicode_literals
  import collections
  import pickle
  import os
  import time
  import warnings
  import numpy
  import pandas
  import tensorflow
  import tempfile
  from deepchem.models import Model
  from deepchem.metrics import from_one_hot
  from deepchem.nn import model_ops
  from deepchem.models.tensorflow_models import utils
  from deepchem.trans import undo_transforms
  from deepchem.utils.save import log
  from deepchem.utils.evaluate import Evaluator
  from deepchem.data import pad_features
  from tensorflow.contrib.layers.python.layers import batch_norm
label_desc: Use image node_id 18 for calling the TensorflowGraphModel obj's underlying member method code with example usage: obj.predict_proba(dataset, transformers, n_classes) and returns: y_pred