def model_layers_list(model):
    """
    List all layers in a Keras model
    """
    print('Model layers:')
    for i, layer in enumerate(model.layers):
        print('  {:3}: {}'.format(i + 1, layer.name))
        for n, w in zip(layer.trainable_weights, layer.get_weights()):
            print('       {}: w = {}'.format(n, w.shape))
