cats

深度学习笔记14_猫狗分类案例优化 - 数据增强

不想你离开。 提交于 2019-11-28 10:39:27
猫狗分类案例优化 - 数据增强 数据增强的基本概念 **数据增强:**利用多种数字图像处理方法(旋转,剪切,错切,缩放,翻转,边缘填充)生成可信图像. 其目标是,模型在训练时不会两次查看完全相同的图像。这让模型能够观察到数据的更多内容,从而具有更好的泛化能力。 在keras中可以通过:ImageDataGenerator函数来实现图像的随机变换. rotation_range 是角度值(在 0~180 范围内),表示图像随机旋转的角度范围。 width_shift 和 height_shift 是图像在水平或垂直方向上平移的范围(相对于总宽度或总高度的比例)。 shear_range 是随机错切变换的角度。 zoom_range 是图像随机缩放的范围。 horizontal_flip 是随机将一半图像水平翻转。如果没有水平不对称的假设(比如真实世界的图像),这种做法是有意义的。 fill_mode是用于填充新创建像素的方法,这些新像素可能来自于旋转或宽度/高度平移。 import os , shutil original_data_dir = "G:/Data/Kaggle/dogcat/train" base_dir = "G:/Data/Kaggle/dogcat/smallData" if os . path . isdir ( base_dir ) == False :

Cats and Fish (模拟)

送分小仙女□ 提交于 2019-11-27 21:14:54
There are many homeless cats in PKU campus. They are all happy because the students in the cat club of PKU take good care of them. Li lei is one of the members of the cat club. He loves those cats very much. Last week, he won a scholarship and he wanted to share his pleasure with cats. So he bought some really tasty fish to feed them, and watched them eating with great pleasure. At the same time, he found an interesting question: There are m fish and n cats, and it takes c i minutes for the i th cat to eat out one fish. A cat starts to eat another fish (if it can get one) immediately after it

题解:Cats and Fish(模拟)

允我心安 提交于 2019-11-27 16:06:27
There are many homeless cats in PKU campus. They are all happy because the students in the cat club of PKU take good care of them. Li lei is one of the members of the cat club. He loves those cats very much. Last week, he won a scholarship and he wanted to share his pleasure with cats. So he bought some really tasty fish to feed them, and watched them eating with great pleasure. At the same time, he found an interesting question: There are m fish and n cats, and it takes ci minutes for the ith cat to eat out one fish. A cat starts to eat another fish (if it can get one) immediately after it