def get_layer(net, layer_name):
    """get layer object by layer name
    Parameters
    ==========
    net: NetParameter
        network
    layer_name: str
        layer name

    Returns
    =======
    layer: LayerParameter or None
        layer, None if not found
    """
    for layer in net.layer:
        if layer.name == layer_name:
            return layer
    return None