【问题标题】:Hybrid CNN RNN has strong overfittingHybrid CNN RNN 有很强的过拟合
【发布时间】:2019-06-07 17:27:20
【问题描述】:

我正在为多通道信号训练由 CNN 和 RNN 组成的神经网络。问题它在我的模拟的 50% 处过拟合(多次运行)。我使用了 0.0006 和 0.001 学习率的 adam。此外,Batch 大小约为 256(对于较小的相同数据集 ~ 2000)。

我为 GRU 单元尝试了不同的大小并添加了 Batchnorm 但不起作用。

正如您所见,当我有义务使用具有最佳 Val_loss 的验证时,但由于这个问题,我无法获得高于 43% 的结果,这是有问题的。我只需要 52% 的测试准确度。

我可以做些什么来获得更高的准确性?

正则化?初始化? Relu函数? http://i.imgur.com/WcWTwWh.png

    x = Conv2D(F1,
               (1, 32))(x)
    x = BatchNormalization(axis=1)(x)
    x = Conv2D((C,1))(x)
    x = BatchNormalization(axis=1)(x)
    x = Activation(activation='elu')(x)
    x = AveragePooling2D(pool_size=(1, 4))(x)
    x = Dropout(rate=r)(x)

    x = Permute((3, 1, 2))(x)
    x = Reshape((size[0], size[1]))(x)

    x = GRU(64,
            activation='tanh',
            recurrent_activation='hard_sigmoid',
            use_bias=True,
            dropout=0.4,
            recurrent_dropout=0.4,
            implementation=1,
            input_shape=(size[0], size[1]))(x)


    x = GRU(64,
            activation='tanh',
            recurrent_activation='hard_sigmoid',
            use_bias=True,
            dropout=0.3,
            recurrent_dropout=0.3)(x)

    x = Dense(num_classes,
              use_bias=True)(x)
    x = Activation(activation='softmax')(x)

【问题讨论】:

    标签: keras deep-learning signal-processing conv-neural-network recurrent-neural-network


    【解决方案1】:

    CNN 的泛化数据集非常小。此外,您的模型还有很多参数需要通过小数据集学习,这又是一个挑战。

    1. 通过使用旋转、缩放等预处理从训练数据中增加新示例。
    2. Dropout 是一种非常强大的控制过度拟合的技术。(您在 cnn 模型中使用过,在 rnn 模型中也使用过),rnn 有空间一维 dropout,它会丢弃一个完整的暗淡,这再次有助于更好地利用概括。

    【讨论】:

      猜你喜欢
      • 2021-12-31
      • 2019-02-10
      • 1970-01-01
      • 2021-09-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-29
      • 2017-08-29
      相关资源
      最近更新 更多