Open unography opened 4 years ago
Normalize tensor based on mean, std
Example usage:
mean = [125.30691805, 122.95039414, 113.86538318] std = [62.99321928, 62.08870764, 66.70489964] normalizer = fn.get_first_argument_transformer(get_image_normalizer(mean=mean, std=std)) transformations = fn.combine_transformers(normalizer) train = train.map(transformations).map(lambda x,y: (x/255.0,y)).prefetch(buffer_size=tf.data.experimental.AUTOTUNE)
Normalize tensor based on mean, std
Example usage: