Keras:过度拟合的Conv2D [英] Keras: Over fitting Conv2D

查看:85
本文介绍了Keras:过度拟合的Conv2D的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建基于卷积的模型.我训练了以下两种不同的结构.如您所见,对于单层而言,历元数没有明显变化.双层Conv2D可以提高火车数据集的准确性和损失,但是验证特性将是一个悲剧. 根据我无法增加数据集的事实,我应该怎么做才能改善验证特性? 我已经检查了正则化器L1& L2,但它们并没有影响我的模型.

I'm trying to build a convolutional based model. I trained two different structures as following. As you can see for single layer there isn't any obvious change along number of epochs. Bi-layer Conv2D presents improving in accuracy and losses for train dataset, but validation characteristics are going to be a tragedy. According to the fact that I can't increase my data-set what should I do to improve validation characteristics? I've examined regularizer L1 & L2 but they didn't affect my model.

推荐答案

我尝试了各种已知可以在小型数据集上很好地工作的模型,但是我怀疑,这也是我的最终判决-这是一个迷失原因.

I tried a variety of models known to work well on small datasets, but as I suspected, and as is my ultimate verdict - it is a lost cause.

您没有足够的数据来训练一个好的DL模型,甚至没有像SVM这样的ML模型-因为八个单独的类而使情况更加恶化;使用SVM进行二进制分类时,您的数据集将有机会,但对于8类而言,则没有机会.作为最后的选择,您可以尝试XGBoost,但我不会打赌.

You don't have nearly enough data to train a good DL model, or even an ML model like SVM - as matter's exacerbated by having eight separate classes; your dataset would stand some chance with an SVM for binary classification, but none for 8-class. As a last resort, you can try XGBoost, but I wouldn't bet on it.

您能做什么?获取更多数据.没有办法解决.我没有确切的数字,但是对于8类分类,我想您需要当前数据的50-200倍才能获得合理的结果.还请注意,在此数字较大的情况下,如果使用更大的验证集,您的验证性能肯定会差很多.

What can you do? Get more data. There's no way around it. I don't have an exact number, but for 8-class classification, I'd say you need anywhere from 50-200x your current data to get reasonable results. Mind also that your validation performance is bound to be much worse on a bigger validation set, accounted for in this number.

对于读者来说,OP与我分享了他的数据集;形状为:X = (1152, 1024, 1), y = (1152, 8)

For readers, OP shared his dataset with me; shapes are: X = (1152, 1024, 1), y = (1152, 8)

这篇关于Keras:过度拟合的Conv2D的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆