tf.keras.preprocessing.image.save_img( path, x, data_format=None, file_format=None, scale=True, **kwargs ) # here x is numpy array