from tensorflow.contrib import layers


  def _dnn_logits(self, features):
    net = layers.input_from_feature_columns(
        features,
        self._get_dnn_feature_columns(),
        weight_collections=[self._dnn_weight_collection])
    for layer_id, num_hidden_units in enumerate(self._dnn_hidden_units):
      net = layers.legacy_fully_connected(
          net,
          num_hidden_units,
          activation_fn=self._dnn_activation_fn,
          weight_collections=[self._dnn_weight_collection],
          bias_collections=[self._dnn_weight_collection],
          name="hiddenlayer_%d" % layer_id)
