def img_random_brightness(img): return tf.image.random_brightness(img, .2) test_random_brightness = (train_data.map(lambda img, label: img_random_brightness(img))) plt.figure(figsize=(6,6)) for img in test_random_brightness.take(1): for num in range(16): ax = plt.subplot(4,4,num+1) plt.imshow((img[num].numpy()).astype("uint8")) plt.axis("off") plt.suptitle("Random Brightness") plt.tight_layout() plt.show() __ __