def global_normalization(inputs, batch_size=100): norm = NormLayer(method="gcn") lcn = K.function([norm.get_input()], norm.get_output()) return batchwise_function(lcn, inputs, batch_size=batch_size)
def contrast_normalization(inputs, batch_size=100): norm = NormLayer() lcn = K.function([norm.get_input()], norm.get_output()) return batchwise_function(lcn, inputs, batch_size=batch_size)