class_docstr: DP version of `tf.compat.v1.estimator.DNNClassifier`.
docstr: See `tf.compat.v1.estimator.DNNClassifier`.
docstr_tok: ["See","`","tf.compat.v1.estimator.DNNClassifier","`","."]
code: def __init__(
      self,
      hidden_units,
      feature_columns,
      model_dir=None,
      n_classes=2,
      weight_column=None,
      label_vocabulary=None,
      optimizer="Adagrad",
      activation_fn=tf.nn.relu,
      dropout=None,
      input_layer_partitioner=None,
      config=None,
      warm_start_from=None,
      loss_reduction=tf.compat.v1.losses.Reduction.SUM,  # For scalar summary.
      batch_norm=False,
  ):
      """See `tf.compat.v1.estimator.DNNClassifier`."""
      head = head_lib._binary_logistic_or_multi_class_head(  # pylint: disable=protected-access
          n_classes, weight_column, label_vocabulary, loss_reduction
      )
      estimator._canned_estimator_api_gauge.get_cell("Classifier").set(
          "DNN"
      )
  
      def _model_fn(features, labels, mode, config):
          """Call the defined shared dnn_model_fn."""
          return dnn._dnn_model_fn(  # pylint: disable=protected-access
              features=features,
              labels=labels,
              mode=mode,
              head=head,
              hidden_units=hidden_units,
              feature_columns=tuple(feature_columns or []),
              optimizer=optimizer,
              activation_fn=activation_fn,
              dropout=dropout,
              input_layer_partitioner=input_layer_partitioner,
              config=config,
              batch_norm=batch_norm,
          )
  
      super().__init__(
          model_fn=_model_fn,
          model_dir=model_dir,
          config=config,
          warm_start_from=warm_start_from,
      )
  
imports: import tensorflow
  from tensorflow_privacy.privacy.estimators.v1 import head
  from tensorflow_estimator.python.estimator import estimator
  from tensorflow_estimator.python.estimator.canned import dnn
label_desc: Use image node_id 1 to create a new DNNClassifier object from inherited base classes: estimator with example: obj = DNNClassifier(hidden_units, feature_columns, model_dir, n_classes, weight_column, label_vocabulary, optimizer, activation_fn, dropout, input_layer_partitioner, config, warm_start_from, loss_reduction, batch_norm)