def get_n_hidden_list(params):
    """Extract list of hidden units from parameter dict"""
    n_hidden_list = []
    for i in range(params['n_layers']):
        name = 'n_hidden_' + str(i)
        n_hidden_list.append(params[name])
    return n_hidden_list