(hidden_structs, cell_type)
return cells
This function contructs a list of cells.
This function contructs a list of cells.
This function contructs a list of cells .
def _contruct_cells(hidden_structs, cell_type):
    """
    This function contructs a list of cells.
    """
    # error checking
    if cell_type not in ["RNN", "LSTM", "GRU"]:
        raise ValueError("The cell type is not currently supported.")

    # define cells
    cells = []
    for hidden_dims in hidden_structs:
        if cell_type == "RNN":
            cell = tf.contrib.rnn.BasicRNNCell(hidden_dims)
        elif cell_type == "LSTM":
            cell = tf.contrib.rnn.BasicLSTMCell(hidden_dims)
        elif cell_type == "GRU":
            cell = tf.contrib.rnn.GRUCell(hidden_dims)
        cells.append(cell)

    return cells
def _contruct_cells ( hidden_structs , cell_type ) : # error checking if cell_type not in [ "RNN" , "LSTM" , "GRU" ] : raise ValueError ( "The cell type is not currently supported." ) # define cells cells = [ ] for hidden_dims in hidden_structs : if cell_type == "RNN" : cell = tf . contrib . rnn . BasicRNNCell ( hidden_dims ) elif cell_type == "LSTM" : cell = tf . contrib . rnn . BasicLSTMCell ( hidden_dims ) elif cell_type == "GRU" : cell = tf . contrib . rnn . GRUCell ( hidden_dims ) cells . append ( cell ) return cells