ResNet调整图层的超参数

时间:2018-04-30 21:12:42

标签: tensorflow resnet

我最近开始使用ResNet,调整official TensorFlow ResNet implementation以运行自定义数据集。我设法调整代码来输入我自己的数据集,但是,当我尝试运行它时,我遇到了图像大小的问题。我的数据集包含512x512图像,而基线实现是为(CIFAR10)32x32图像构建的。因此,为了运行网络,我必须更改网络的模型(层的大小和跨度),以便网络的输出大小正确,否则代码会输出错误,指责大小不匹配。这些图层目前定义为:

number of filters: 16
kernel size of the first convolution: 3
stride of the first convolution: 1
size of the first pooling layer: None (currently being skipped)
stride of the first pooling layer: None (currently being skipped)
size of the second pooling layer: 8
stride of the second pooling layer: 1
number of blocks in each block layer: [8, 8, 8]
stride of each block layer: [1, 2, 2]
fully connected layer size: 64

我是卷积神经网络领域的新手,所以我不知道什么是适应这些层的最佳方法。我尝试了一种天真的方法,稍微增加每一层,以避免对单个图层进行大规模更改,并遵循我从 here中选择的一些指导原则。

number of filters: 32
kernel size of the first convolution: 7
stride of the first convolution: 2
size of the first pooling layer: 3
stride of the first pooling layer: 2
size of the second pooling layer: 7
stride of the second pooling layer: 1
number of blocks in each block layer: [8, 8, 8, 8]
stride of each block layer: [2, 2, 2, 2]
fully connected layer size: 1024

然而,随着这些变化,网络不会收敛,并且损失会迅速增加到无穷大(例如,在100个训练步骤之后损失将近400万)。我可以用一套指导方针或提示来改善这种适应性吗?

非常感谢在这方面的任何帮助或提示。

0 个答案:

没有答案
相关问题