parameters: (self, ensemble_handle, ensemble_stamp, mode)
return_statement: return _make_predictions_dict(ensemble_stamp, predictions, partition_ids,
                                    ensemble_stats)
docstring: Runs prediction and returns a dictionary of the prediction results.
  
      Args:
        ensemble_handle: ensemble resource handle.
        ensemble_stamp: stamp of ensemble resource.
        mode: learn.ModeKeys.TRAIN or EVAL or INFER.
  
      Returns:
        a dictionary of prediction results -
          ENSEMBLE_STAMP, PREDICTION, PARTITION_IDS,
          NUM_LAYER_ATTEMPTED, NUM_TREES_ATTEMPED.
docstring_summary: Runs prediction and returns a dictionary of the prediction results.
docstring_tokens: Runs prediction and returns a dictionary of the prediction results .
function: def _predict_and_return_dict(self, ensemble_handle, ensemble_stamp, mode):
      """Runs prediction and returns a dictionary of the prediction results.
  
      Args:
        ensemble_handle: ensemble resource handle.
        ensemble_stamp: stamp of ensemble resource.
        mode: learn.ModeKeys.TRAIN or EVAL or INFER.
  
      Returns:
        a dictionary of prediction results -
          ENSEMBLE_STAMP, PREDICTION, PARTITION_IDS,
          NUM_LAYER_ATTEMPTED, NUM_TREES_ATTEMPED.
      """
      ensemble_stats = training_ops.tree_ensemble_stats(ensemble_handle,
                                                        ensemble_stamp)
      # We don't need dropout info - we can always restore it based on the
      # seed.
      apply_dropout, seed = _dropout_params(mode, ensemble_stats)
      # Make sure ensemble stats run. This will check that the ensemble has
      # the right stamp.
      with ops.control_dependencies(ensemble_stats):
        predictions, _ = prediction_ops.gradient_trees_prediction(
            ensemble_handle,
            seed,
            self._dense_floats,
            self._sparse_float_indices,
            self._sparse_float_values,
            self._sparse_float_shapes,
            self._sparse_int_indices,
            self._sparse_int_values,
            self._sparse_int_shapes,
            learner_config=self._learner_config_serialized,
            apply_dropout=apply_dropout,
            apply_averaging=mode != learn.ModeKeys.TRAIN,
            use_locking=True,
            center_bias=self._center_bias,
            reduce_dim=self._reduce_dim)
        partition_ids = prediction_ops.gradient_trees_partition_examples(
            ensemble_handle,
            self._dense_floats,
            self._sparse_float_indices,
            self._sparse_float_values,
            self._sparse_float_shapes,
            self._sparse_int_indices,
            self._sparse_int_values,
            self._sparse_int_shapes,
            use_locking=True)
  
      return _make_predictions_dict(ensemble_stamp, predictions, partition_ids,
                                    ensemble_stats)
function_tokens: def _predict_and_return_dict ( self , ensemble_handle , ensemble_stamp , mode ) : ensemble_stats = training_ops . tree_ensemble_stats ( ensemble_handle , ensemble_stamp ) # We don't need dropout info - we can always restore it based on the # seed. apply_dropout , seed = _dropout_params ( mode , ensemble_stats ) # Make sure ensemble stats run. This will check that the ensemble has # the right stamp. with ops . control_dependencies ( ensemble_stats ) : predictions , _ = prediction_ops . gradient_trees_prediction ( ensemble_handle , seed , self . _dense_floats , self . _sparse_float_indices , self . _sparse_float_values , self . _sparse_float_shapes , self . _sparse_int_indices , self . _sparse_int_values , self . _sparse_int_shapes , learner_config = self . _learner_config_serialized , apply_dropout = apply_dropout , apply_averaging = mode != learn . ModeKeys . TRAIN , use_locking = True , center_bias = self . _center_bias , reduce_dim = self . _reduce_dim ) partition_ids = prediction_ops . gradient_trees_partition_examples ( ensemble_handle , self . _dense_floats , self . _sparse_float_indices , self . _sparse_float_values , self . _sparse_float_shapes , self . _sparse_int_indices , self . _sparse_int_values , self . _sparse_int_shapes , use_locking = True ) return _make_predictions_dict ( ensemble_stamp , predictions , partition_ids , ensemble_stats )