问题描述
我已经创建了DCGAN,并已经对其进行了CIFAR-10数据集的培训.现在,我想针对自定义数据集进行训练.
I have created a DCGAN and already trained it for CIFAR-10 dataset. Now, i would like to train it for custom dataset.
我已经收集了大约1200张图像,实际上不可能收集更多图像.我该怎么办?
I have already gathered around 1200 images, it is practicly impossible to gather more. What should i do?
推荐答案
我们将在接下来的几周内发布一篇有关发电机随机反卷积的论文,该论文可以提高此类问题的稳定性和多样性.如果您有兴趣,我可以立即发送最新版本的论文.但总的来说,这个想法很简单:
We are going to post a paper in a coming week(s) about stochastic deconvolutions for generator, that can improve stability and variety for such a problem. If you are interested, I can send a current version of a paper right now. But generally speaking, the idea is simple:
- 构建经典GAN
- 对于生成器的较深层(假设其中的一半),请使用随机反卷积(sdeconv)
- sdeconv只是一个普通的deconv层,但是正在从一组过滤器中随机选择过滤器.因此,您的过滤器库形状可以是(16,128,3,3),其中16-库数,128-每个过滤器数,3x3-大小.您在每个训练步骤中选择的过滤器集为[随机统一0-16,:,:,:].未选择的过滤器保持未经训练的状态.在tensorflow中,您想为不同的图像批量选择不同的过滤器集,并且即使没有要求tf也会保留训练变量(我们认为这是一个错误,tf对所有变量使用了最后已知的梯度,即使它们不是被用于当前的动态子图中,因此您必须尽可能多地利用变量.)
就是这样.每个存储库中有3层带有sdeconv的16组,实际上,您将具有不同内部路由的16x16x16 = 4096个组合以产生输出.对小型数据集有何帮助? -通常,小型数据集具有相对较大的主题"方差,但通常,数据集属于一种性质(猫的照片:均为真实照片,但猫的类型不同).在此类数据集中,GAN很快崩溃,但是使用sdeconv:
That's it. Having 3 layers with sdeconv of 16 sets in each bank, practically you'll have 16x16x16 = 4096 combinations of different internal routes to produce an output.How is it helping on a small dataset? - Usually small datasets have relative large "topics" variance, but generally dataset is of one nature (photos of cats: all are realistc photos, but with different types of cats). In such datasets GAN collapses very quickly, however with sdeconv:
- 上层常规反变换层学习如何重建样式逼真的照片"
- 较低的sdevond学习子分布:黑猫",白猫",红猫"等.
- 模型可以看作是弱生成器的集合,每个子生成器都很弱并且可以崩溃,但是会得到另一个暂时优于鉴别器的子生成器的支持".
MNIST是此类数据集的一个很好的例子:主题"差异很大,但数字风格相同.
MNIST is a great example of such a dataset: high "topics" variance, but the same style of digits.
GAN +权重范数+ prelu(在1000个步骤后崩溃,在2000年后死亡,只能描述一个主题"):
GAN+weight norm+prelu (collapsed after 1000 steps, died after 2000, can only describe one "topic"):
GAN +权重标准+ prelu + sdeconv,4388步(可以看到子主题的局部变种,但并未在全球范围内崩溃,保留了全局视觉变体):
GAN+weight norm+prelu+sdeconv, 4388 steps (local variety degradation of sub-topics is seen, however not collapsed globally, global visual variety preserved):
这篇关于在小型图像数据集上训练GAN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!