def dnn(tensor_in, hidden_units, activation=nn.relu, dropout=None):
    'Creates fully connected deep neural network subgraph.\n\n  Args:\n    tensor_in: tensor or placeholder for input features.\n    hidden_units: list of counts of hidden units in each layer.\n    activation: activation function between layers. Can be None.\n    dropout: if not None, will add a dropout layer with given probability.\n\n  Returns:\n    A tensor which would be a deep neural network.\n  '
    with vs.variable_scope('dnn'):
        for (i, n_units) in enumerate(hidden_units):
            with vs.variable_scope(('layer%d' % i)):
                tensor_in = rnn_cell.linear(tensor_in, n_units, True)
                if (activation is not None):
                    tensor_in = activation(tensor_in)
                if (dropout is not None):
                    tensor_in = dropout_ops.dropout(tensor_in, prob=(1.0 - dropout))
        return tensor_in
Creates fully connected deep neural network subgraph.

Args:
  tensor_in: tensor or placeholder for input features.
  hidden_units: list of counts of hidden units in each layer.
  activation: activation function between layers. Can be None.
  dropout: if not None, will add a dropout layer with given probability.

Returns:
  A tensor which would be a deep neural network.
def dnn(tensor_in, hidden_units, activation=nn.relu, dropout=None):
    'Creates fully connected deep neural network subgraph.\n\n  Args:\n    tensor_in: tensor or placeholder for input features.\n    hidden_units: list of counts of hidden units in each layer.\n    activation: activation function between layers. Can be None.\n    dropout: if not None, will add a dropout layer with given probability.\n\n  Returns:\n    A tensor which would be a deep neural network.\n  '
    with vs.variable_scope('dnn'):
        for (i, n_units) in enumerate(hidden_units):
            with vs.variable_scope(('layer%d' % i)):
                tensor_in = rnn_cell.linear(tensor_in, n_units, True)
                if (activation is not None):
                    tensor_in = activation(tensor_in)
                if (dropout is not None):
                    tensor_in = dropout_ops.dropout(tensor_in, prob=(1.0 - dropout))
        return tensor_in