def genBNLayer(train_val, name, bottom, top=None):
    top = (name if (top is None) else top)
    layer_str = '\nlayer {{\n  name: "{name}"\n  type: "BatchNorm"\n  bottom: "{bottom}"\n  top: "{top}"\n  batch_norm_param {{\n    moving_average_fraction: 0.9\n    eps: 0.0001\n    scale_bias: true\n  }}\n}}'.format(name=name, top=top, bottom=bottom)
    train_val += layer_str
    return (train_val, top)
def genBNLayer(train_val, name, bottom, top=None):
    top = (name if (top is None) else top)
    layer_str = '\nlayer {{\n  name: "{name}"\n  type: "BatchNorm"\n  bottom: "{bottom}"\n  top: "{top}"\n  batch_norm_param {{\n    moving_average_fraction: 0.9\n    eps: 0.0001\n    scale_bias: true\n  }}\n}}'.format(name=name, top=top, bottom=bottom)
    train_val += layer_str
    return (train_val, top)