def nice_layer_name(weight_key):
    """Takes a tuple like ('weights', 2) and returns a nice string like "2nd layer weights"
       for use in plots and legends."""
    return "Layer {num} {name}".format(num=weight_key[1] + 1, name=weight_key[0])