Bu yerda sizning funksiyangizning modifikatsiya qilingan versiyasi mavjud, u Scipy-ning o'lchash funksiyasi o'rniga Pillow kutubxonasidan foydalanadi: ''PIL importidan Image def resize_images ((images, res_x, res_y): resized_images = np.zeros (((images.shape[0], res_x, res_y)) n uchun n diapazonida (((lenimages)): image = Image.fromarray ((images[n, :, :].astype ((np.uint8)) resized_image = image.resize (((res_x, res_y), resample=Image.NEAREST) resized_images[n, :, :] = np.arrayresized_image) return resized_images' Ushbu
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence