【哈工大版】动态ReLU:自适应参数化ReLU及Keras代码(调参记录11)

2020-05-27 18:12:20 浏览数 (1)

本文介绍哈工大团队提出的一种动态ReLU(Dynamic ReLU)激活函数,即自适应参数化ReLU激活函数,原本是应用在基于一维振动信号的故障诊断,能够让每个样本有自己独特的ReLU参数,在2019年5月3日投稿至IEEE Transactions on Industrial Electronics,2020年1月24日录用,2020年2月13日在IEEE官网公布

本文在调参记录10的基础上,将残差模块的数量从27个增加到60个,测试采用自适应参数化ReLU(APReLU)激活函数的深度残差网络,在Cifar10图像集上的效果。

自适应参数化ReLU:一种动态ReLU激活函数自适应参数化ReLU:一种动态ReLU激活函数

Keras程序如下:

代码语言:python代码运行次数:0复制
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 14 04:17:45 2020
Implemented using TensorFlow 1.0.1 and Keras 2.2.1

Minghang Zhao, Shisheng Zhong, Xuyun Fu, Baoping Tang, Shaojiang Dong, Michael Pecht,
Deep Residual Networks with Adaptively Parametric Rectifier Linear Units for Fault Diagnosis, 
IEEE Transactions on Industrial Electronics, DOI: 10.1109/TIE.2020.2972458,
Date of Publication: 13 February 2020

@author: Minghang Zhao
"""

from __future__ import print_function
import keras
import numpy as np
from keras.datasets import cifar10
from keras.layers import Dense, Conv2D, BatchNormalization, Activation, Minimum
from keras.layers import AveragePooling2D, Input, GlobalAveragePooling2D, Concatenate, Reshape
from keras.regularizers import l2
from keras import backend as K
from keras.models import Model
from keras import optimizers
from keras.preprocessing.image import ImageDataGenerator
from keras.callbacks import LearningRateScheduler
K.set_learning_phase(1)

# The data, split between train and test sets
(x_train, y_train), (x_test, y_test) = cifar10.load_data()
x_train = x_train.astype('float32') / 255.
x_test = x_test.astype('float32') / 255.
x_test = x_test-np.mean(x_train)
x_train = x_train-np.mean(x_train)
print('x_train shape:', x_train.shape)
print(x_train.shape[0], 'train samples')
print(x_test.shape[0], 'test samples')

# convert class vectors to binary class matrices
y_train = keras.utils.to_categorical(y_train, 10)
y_test = keras.utils.to_categorical(y_test, 10)

# Schedule the learning rate, multiply 0.1 every 300 epoches
def scheduler(epoch):
    if epoch % 300 == 0 and epoch != 0:
        lr = K.get_value(model.optimizer.lr)
        K.set_value(model.optimizer.lr, lr * 0.1)
        print("lr changed to {}".format(lr * 0.1))
    return K.get_value(model.optimizer.lr)

# An adaptively parametric rectifier linear unit (APReLU)
def aprelu(inputs):
    # get the number of channels
    channels = inputs.get_shape().as_list()[-1]
    # get a zero feature map
    zeros_input = keras.layers.subtract([inputs, inputs])
    # get a feature map with only positive features
    pos_input = Activation('relu')(inputs)
    # get a feature map with only negative features
    neg_input = Minimum()([inputs,zeros_input])
    # define a network to obtain the scaling coefficients
    scales_p = GlobalAveragePooling2D()(pos_input)
    scales_n = GlobalAveragePooling2D()(neg_input)
    scales = Concatenate()([scales_n, scales_p])
    scales = Dense(channels, activation='linear', kernel_initializer='he_normal', kernel_regularizer=l2(1e-4))(scales)
    scales = BatchNormalization(momentum=0.9, gamma_regularizer=l2(1e-4))(scales)
    scales = Activation('relu')(scales)
    scales = Dense(channels, activation='linear', kernel_initializer='he_normal', kernel_regularizer=l2(1e-4))(scales)
    scales = BatchNormalization(momentum=0.9, gamma_regularizer=l2(1e-4))(scales)
    scales = Activation('sigmoid')(scales)
    scales = Reshape((1,1,channels))(scales)
    # apply a paramtetric relu
    neg_part = keras.layers.multiply([scales, neg_input])
    return keras.layers.add([pos_input, neg_part])

# Residual Block
def residual_block(incoming, nb_blocks, out_channels, downsample=False,
                   downsample_strides=2):
    
    residual = incoming
    in_channels = incoming.get_shape().as_list()[-1]
    
    for i in range(nb_blocks):
        
        identity = residual
        
        if not downsample:
            downsample_strides = 1
        
        residual = BatchNormalization(momentum=0.9, gamma_regularizer=l2(1e-4))(residual)
        residual = aprelu(residual)
        residual = Conv2D(out_channels, 3, strides=(downsample_strides, downsample_strides), 
                          padding='same', kernel_initializer='he_normal', 
                          kernel_regularizer=l2(1e-4))(residual)
        
        residual = BatchNormalization(momentum=0.9, gamma_regularizer=l2(1e-4))(residual)
        residual = aprelu(residual)
        residual = Conv2D(out_channels, 3, padding='same', kernel_initializer='he_normal', 
                          kernel_regularizer=l2(1e-4))(residual)
        
        # Downsampling
        if downsample_strides > 1:
            identity = AveragePooling2D(pool_size=(1,1), strides=(2,2))(identity)
            
        # Zero_padding to match channels
        if in_channels != out_channels:
            zeros_identity = keras.layers.subtract([identity, identity])
            identity = keras.layers.concatenate([identity, zeros_identity])
            in_channels = out_channels
        
        residual = keras.layers.add([residual, identity])
    
    return residual


# define and train a model
inputs = Input(shape=(32, 32, 3))
net = Conv2D(16, 3, padding='same', kernel_initializer='he_normal', kernel_regularizer=l2(1e-4))(inputs)
net = residual_block(net, 20, 16, downsample=False)
net = residual_block(net,  1, 32, downsample=True)
net = residual_block(net, 19, 32, downsample=False)
net = residual_block(net,  1, 64, downsample=True)
net = residual_block(net, 19, 64, downsample=False)
net = BatchNormalization(momentum=0.9, gamma_regularizer=l2(1e-4))(net)
net = Activation('relu')(net)
net = GlobalAveragePooling2D()(net)
outputs = Dense(10, activation='softmax', kernel_initializer='he_normal', kernel_regularizer=l2(1e-4))(net)
model = Model(inputs=inputs, outputs=outputs)
sgd = optimizers.SGD(lr=0.1, decay=0., momentum=0.9, nesterov=True)
model.compile(loss='categorical_crossentropy', optimizer=sgd, metrics=['accuracy'])

# data augmentation
datagen = ImageDataGenerator(
    # randomly rotate images in the range (deg 0 to 180)
    rotation_range=30,
    # shear angle in counter-clockwise direction in degrees
    shear_range = 30,
    # randomly flip images
    horizontal_flip=True,
    # randomly shift images horizontally
    width_shift_range=0.125,
    # randomly shift images vertically
    height_shift_range=0.125)

reduce_lr = LearningRateScheduler(scheduler)
# fit the model on the batches generated by datagen.flow().
model.fit_generator(datagen.flow(x_train, y_train, batch_size=100),
                    validation_data=(x_test, y_test), epochs=1000, 
                    verbose=1, callbacks=[reduce_lr], workers=4)

# get results
K.set_learning_phase(0)
DRSN_train_score = model.evaluate(x_train, y_train, batch_size=100, verbose=0)
print('Train loss:', DRSN_train_score[0])
print('Train accuracy:', DRSN_train_score[1])
DRSN_test_score = model.evaluate(x_test, y_test, batch_size=100, verbose=0)
print('Test loss:', DRSN_test_score[0])
print('Test accuracy:', DRSN_test_score[1])

实验结果如下(跑得好慢,不知道能不能跑完):

代码语言:javascript复制
Using TensorFlow backend.
x_train shape: (50000, 32, 32, 3)
50000 train samples
10000 test samples
Epoch 1/1000
216s 433ms/step - loss: 5.3303 - acc: 0.3881 - val_loss: 4.6744 - val_acc: 0.5067
Epoch 2/1000
142s 284ms/step - loss: 4.3438 - acc: 0.5292 - val_loss: 3.8578 - val_acc: 0.6084
Epoch 3/1000
142s 284ms/step - loss: 3.6504 - acc: 0.5949 - val_loss: 3.2425 - val_acc: 0.6673
Epoch 4/1000
142s 284ms/step - loss: 3.1230 - acc: 0.6384 - val_loss: 2.8284 - val_acc: 0.6826
Epoch 5/1000
142s 284ms/step - loss: 2.7009 - acc: 0.6656 - val_loss: 2.4285 - val_acc: 0.7164
Epoch 6/1000
142s 284ms/step - loss: 2.3806 - acc: 0.6838 - val_loss: 2.1267 - val_acc: 0.7293
Epoch 7/1000
142s 284ms/step - loss: 2.1009 - acc: 0.7026 - val_loss: 1.9077 - val_acc: 0.7389
Epoch 8/1000
142s 284ms/step - loss: 1.8769 - acc: 0.7181 - val_loss: 1.7067 - val_acc: 0.7544
Epoch 9/1000
142s 284ms/step - loss: 1.6922 - acc: 0.7336 - val_loss: 1.5801 - val_acc: 0.7518
Epoch 10/1000
142s 284ms/step - loss: 1.5452 - acc: 0.7440 - val_loss: 1.4281 - val_acc: 0.7685
Epoch 11/1000
142s 284ms/step - loss: 1.4296 - acc: 0.7495 - val_loss: 1.3131 - val_acc: 0.7802
Epoch 12/1000
142s 284ms/step - loss: 1.3341 - acc: 0.7572 - val_loss: 1.2388 - val_acc: 0.7803
Epoch 13/1000
142s 284ms/step - loss: 1.2588 - acc: 0.7623 - val_loss: 1.1707 - val_acc: 0.7887
Epoch 14/1000
142s 284ms/step - loss: 1.1930 - acc: 0.7688 - val_loss: 1.0920 - val_acc: 0.8042
Epoch 15/1000
142s 284ms/step - loss: 1.1506 - acc: 0.7699 - val_loss: 1.0500 - val_acc: 0.8034
Epoch 16/1000
142s 284ms/step - loss: 1.1056 - acc: 0.7766 - val_loss: 1.0199 - val_acc: 0.8052
Epoch 17/1000
142s 284ms/step - loss: 1.0735 - acc: 0.7772 - val_loss: 0.9737 - val_acc: 0.8178
Epoch 18/1000
142s 284ms/step - loss: 1.0420 - acc: 0.7833 - val_loss: 0.9912 - val_acc: 0.8025
Epoch 19/1000
142s 284ms/step - loss: 1.0156 - acc: 0.7860 - val_loss: 0.9525 - val_acc: 0.8041
Epoch 20/1000
142s 284ms/step - loss: 0.9980 - acc: 0.7892 - val_loss: 0.9304 - val_acc: 0.8140
Epoch 21/1000
142s 284ms/step - loss: 0.9773 - acc: 0.7910 - val_loss: 0.9240 - val_acc: 0.8116
Epoch 22/1000
142s 284ms/step - loss: 0.9600 - acc: 0.7931 - val_loss: 0.8714 - val_acc: 0.8248
Epoch 23/1000
142s 284ms/step - loss: 0.9449 - acc: 0.7969 - val_loss: 0.8751 - val_acc: 0.8234
Epoch 24/1000
142s 284ms/step - loss: 0.9424 - acc: 0.7958 - val_loss: 0.8551 - val_acc: 0.8261
Epoch 25/1000
142s 284ms/step - loss: 0.9224 - acc: 0.8039 - val_loss: 0.8438 - val_acc: 0.8336
Epoch 26/1000
142s 284ms/step - loss: 0.9131 - acc: 0.8023 - val_loss: 0.8542 - val_acc: 0.8272
Epoch 27/1000
142s 284ms/step - loss: 0.8975 - acc: 0.8069 - val_loss: 0.8719 - val_acc: 0.8196
Epoch 28/1000
142s 284ms/step - loss: 0.8987 - acc: 0.8085 - val_loss: 0.8269 - val_acc: 0.8355
Epoch 29/1000
142s 284ms/step - loss: 0.8824 - acc: 0.8122 - val_loss: 0.8305 - val_acc: 0.8324
Epoch 30/1000
142s 284ms/step - loss: 0.8837 - acc: 0.8102 - val_loss: 0.8332 - val_acc: 0.8247
Epoch 31/1000
142s 284ms/step - loss: 0.8727 - acc: 0.8130 - val_loss: 0.8075 - val_acc: 0.8386
Epoch 32/1000
142s 284ms/step - loss: 0.8686 - acc: 0.8154 - val_loss: 0.8198 - val_acc: 0.8350
Epoch 33/1000
142s 284ms/step - loss: 0.8608 - acc: 0.8150 - val_loss: 0.8006 - val_acc: 0.8396
Epoch 34/1000
142s 284ms/step - loss: 0.8553 - acc: 0.8188 - val_loss: 0.8249 - val_acc: 0.8324
Epoch 35/1000
142s 284ms/step - loss: 0.8474 - acc: 0.8197 - val_loss: 0.7876 - val_acc: 0.8437
Epoch 36/1000
142s 284ms/step - loss: 0.8473 - acc: 0.8218 - val_loss: 0.7648 - val_acc: 0.8555
Epoch 37/1000
142s 284ms/step - loss: 0.8410 - acc: 0.8235 - val_loss: 0.7866 - val_acc: 0.8432
Epoch 38/1000
142s 285ms/step - loss: 0.8334 - acc: 0.8245 - val_loss: 0.7785 - val_acc: 0.8473
Epoch 39/1000
142s 284ms/step - loss: 0.8336 - acc: 0.8263 - val_loss: 0.7783 - val_acc: 0.8486
Epoch 40/1000
142s 284ms/step - loss: 0.8337 - acc: 0.8245 - val_loss: 0.7782 - val_acc: 0.8461
Epoch 41/1000
142s 284ms/step - loss: 0.8292 - acc: 0.8257 - val_loss: 0.7696 - val_acc: 0.8498
Epoch 42/1000
142s 284ms/step - loss: 0.8203 - acc: 0.8298 - val_loss: 0.7618 - val_acc: 0.8511
Epoch 43/1000
142s 284ms/step - loss: 0.8209 - acc: 0.8303 - val_loss: 0.7634 - val_acc: 0.8551
Epoch 44/1000
142s 284ms/step - loss: 0.8163 - acc: 0.8327 - val_loss: 0.7719 - val_acc: 0.8449
Epoch 45/1000
142s 285ms/step - loss: 0.8072 - acc: 0.8328 - val_loss: 0.7635 - val_acc: 0.8493
Epoch 46/1000
142s 284ms/step - loss: 0.8127 - acc: 0.8324 - val_loss: 0.7725 - val_acc: 0.8495
Epoch 47/1000
142s 285ms/step - loss: 0.8081 - acc: 0.8343 - val_loss: 0.7576 - val_acc: 0.8537
Epoch 48/1000
142s 284ms/step - loss: 0.8090 - acc: 0.8322 - val_loss: 0.7421 - val_acc: 0.8603
Epoch 49/1000
142s 285ms/step - loss: 0.8041 - acc: 0.8344 - val_loss: 0.7422 - val_acc: 0.8576
Epoch 50/1000
142s 284ms/step - loss: 0.8008 - acc: 0.8361 - val_loss: 0.7472 - val_acc: 0.8566
Epoch 51/1000
142s 284ms/step - loss: 0.8013 - acc: 0.8379 - val_loss: 0.7385 - val_acc: 0.8585
Epoch 52/1000
142s 285ms/step - loss: 0.7964 - acc: 0.8381 - val_loss: 0.7805 - val_acc: 0.8453
Epoch 53/1000
142s 285ms/step - loss: 0.7929 - acc: 0.8387 - val_loss: 0.7597 - val_acc: 0.8516
Epoch 54/1000
142s 284ms/step - loss: 0.7945 - acc: 0.8388 - val_loss: 0.7596 - val_acc: 0.8529
Epoch 55/1000
142s 285ms/step - loss: 0.7904 - acc: 0.8407 - val_loss: 0.7376 - val_acc: 0.8594
Epoch 56/1000
142s 284ms/step - loss: 0.7806 - acc: 0.8443 - val_loss: 0.7478 - val_acc: 0.8551
Epoch 57/1000
142s 284ms/step - loss: 0.7807 - acc: 0.8444 - val_loss: 0.7536 - val_acc: 0.8547
Epoch 58/1000
142s 284ms/step - loss: 0.7838 - acc: 0.8440 - val_loss: 0.7164 - val_acc: 0.8686
Epoch 59/1000
142s 284ms/step - loss: 0.7777 - acc: 0.8444 - val_loss: 0.7441 - val_acc: 0.8601
Epoch 60/1000
142s 284ms/step - loss: 0.7786 - acc: 0.8461 - val_loss: 0.7339 - val_acc: 0.8603
Epoch 61/1000
142s 284ms/step - loss: 0.7765 - acc: 0.8438 - val_loss: 0.7224 - val_acc: 0.8649
Epoch 62/1000
142s 284ms/step - loss: 0.7733 - acc: 0.8462 - val_loss: 0.7340 - val_acc: 0.8584
Epoch 63/1000
142s 284ms/step - loss: 0.7694 - acc: 0.8475 - val_loss: 0.7215 - val_acc: 0.8658
Epoch 64/1000
142s 284ms/step - loss: 0.7734 - acc: 0.8451 - val_loss: 0.7256 - val_acc: 0.8662
Epoch 65/1000
142s 284ms/step - loss: 0.7726 - acc: 0.8461 - val_loss: 0.7094 - val_acc: 0.8699
Epoch 66/1000
142s 284ms/step - loss: 0.7731 - acc: 0.8464 - val_loss: 0.7434 - val_acc: 0.8636
Epoch 67/1000
142s 284ms/step - loss: 0.7707 - acc: 0.8470 - val_loss: 0.7170 - val_acc: 0.8668
Epoch 68/1000
142s 284ms/step - loss: 0.7649 - acc: 0.8481 - val_loss: 0.7423 - val_acc: 0.8611
Epoch 69/1000
142s 284ms/step - loss: 0.7691 - acc: 0.8477 - val_loss: 0.7237 - val_acc: 0.8621
Epoch 70/1000
142s 284ms/step - loss: 0.7679 - acc: 0.8482 - val_loss: 0.7110 - val_acc: 0.8717
Epoch 71/1000
142s 284ms/step - loss: 0.7633 - acc: 0.8492 - val_loss: 0.7444 - val_acc: 0.8622
Epoch 72/1000
142s 284ms/step - loss: 0.7622 - acc: 0.8502 - val_loss: 0.7188 - val_acc: 0.8630
Epoch 73/1000
142s 284ms/step - loss: 0.7578 - acc: 0.8515 - val_loss: 0.7131 - val_acc: 0.8706
Epoch 74/1000
142s 284ms/step - loss: 0.7600 - acc: 0.8499 - val_loss: 0.7096 - val_acc: 0.8716
Epoch 75/1000
142s 284ms/step - loss: 0.7576 - acc: 0.8506 - val_loss: 0.7224 - val_acc: 0.8640
Epoch 76/1000
142s 284ms/step - loss: 0.7571 - acc: 0.8519 - val_loss: 0.7212 - val_acc: 0.8660
Epoch 77/1000
142s 284ms/step - loss: 0.7566 - acc: 0.8537 - val_loss: 0.7008 - val_acc: 0.8733
Epoch 78/1000
142s 284ms/step - loss: 0.7559 - acc: 0.8516 - val_loss: 0.7283 - val_acc: 0.8635
Epoch 79/1000
142s 284ms/step - loss: 0.7524 - acc: 0.8541 - val_loss: 0.7403 - val_acc: 0.8573
Epoch 80/1000
142s 284ms/step - loss: 0.7504 - acc: 0.8536 - val_loss: 0.7243 - val_acc: 0.8656
Epoch 81/1000
142s 284ms/step - loss: 0.7499 - acc: 0.8536 - val_loss: 0.7063 - val_acc: 0.8732
Epoch 82/1000
142s 284ms/step - loss: 0.7473 - acc: 0.8565 - val_loss: 0.6971 - val_acc: 0.8747
Epoch 83/1000
142s 284ms/step - loss: 0.7473 - acc: 0.8551 - val_loss: 0.7468 - val_acc: 0.8552
Epoch 84/1000
142s 284ms/step - loss: 0.7482 - acc: 0.8553 - val_loss: 0.7314 - val_acc: 0.8598
Epoch 85/1000
142s 285ms/step - loss: 0.7482 - acc: 0.8535 - val_loss: 0.6948 - val_acc: 0.8744
Epoch 86/1000
142s 284ms/step - loss: 0.7483 - acc: 0.8534 - val_loss: 0.7078 - val_acc: 0.8709
Epoch 87/1000
143s 285ms/step - loss: 0.7423 - acc: 0.8562 - val_loss: 0.7032 - val_acc: 0.8722
Epoch 88/1000
142s 284ms/step - loss: 0.7454 - acc: 0.8552 - val_loss: 0.7115 - val_acc: 0.8688
Epoch 89/1000
142s 284ms/step - loss: 0.7392 - acc: 0.8578 - val_loss: 0.7133 - val_acc: 0.8657
Epoch 90/1000
142s 284ms/step - loss: 0.7432 - acc: 0.8582 - val_loss: 0.6976 - val_acc: 0.8736
Epoch 91/1000
142s 284ms/step - loss: 0.7391 - acc: 0.8568 - val_loss: 0.6976 - val_acc: 0.8726
Epoch 92/1000
142s 284ms/step - loss: 0.7423 - acc: 0.8551 - val_loss: 0.7116 - val_acc: 0.8693
Epoch 93/1000
142s 284ms/step - loss: 0.7412 - acc: 0.8559 - val_loss: 0.7249 - val_acc: 0.8657
Epoch 94/1000
142s 284ms/step - loss: 0.7374 - acc: 0.8579 - val_loss: 0.6937 - val_acc: 0.8782
Epoch 95/1000
142s 284ms/step - loss: 0.7339 - acc: 0.8578 - val_loss: 0.6872 - val_acc: 0.8770
Epoch 96/1000
142s 284ms/step - loss: 0.7422 - acc: 0.8561 - val_loss: 0.7079 - val_acc: 0.8712
Epoch 97/1000
142s 284ms/step - loss: 0.7376 - acc: 0.8598 - val_loss: 0.7335 - val_acc: 0.8619
Epoch 98/1000
142s 284ms/step - loss: 0.7357 - acc: 0.8585 - val_loss: 0.6998 - val_acc: 0.8762
Epoch 99/1000
142s 284ms/step - loss: 0.7355 - acc: 0.8589 - val_loss: 0.6954 - val_acc: 0.8751
Epoch 100/1000
142s 284ms/step - loss: 0.7331 - acc: 0.8608 - val_loss: 0.7237 - val_acc: 0.8646
Epoch 101/1000
142s 284ms/step - loss: 0.7293 - acc: 0.8610 - val_loss: 0.7088 - val_acc: 0.8710
Epoch 102/1000
142s 284ms/step - loss: 0.7336 - acc: 0.8597 - val_loss: 0.7064 - val_acc: 0.8712
Epoch 103/1000
142s 284ms/step - loss: 0.7329 - acc: 0.8599 - val_loss: 0.6799 - val_acc: 0.8843
Epoch 104/1000
142s 284ms/step - loss: 0.7279 - acc: 0.8624 - val_loss: 0.6911 - val_acc: 0.8754
Epoch 105/1000
142s 284ms/step - loss: 0.7301 - acc: 0.8616 - val_loss: 0.7133 - val_acc: 0.8665
Epoch 106/1000
142s 284ms/step - loss: 0.7348 - acc: 0.8580 - val_loss: 0.7112 - val_acc: 0.8689
Epoch 107/1000
142s 283ms/step - loss: 0.7331 - acc: 0.8608 - val_loss: 0.7015 - val_acc: 0.8733
Epoch 108/1000
141s 283ms/step - loss: 0.7302 - acc: 0.8614 - val_loss: 0.7154 - val_acc: 0.8663
Epoch 109/1000
142s 283ms/step - loss: 0.7274 - acc: 0.8618 - val_loss: 0.7076 - val_acc: 0.8682
Epoch 110/1000
142s 283ms/step - loss: 0.7303 - acc: 0.8604 - val_loss: 0.7166 - val_acc: 0.8689
Epoch 111/1000
142s 284ms/step - loss: 0.7253 - acc: 0.8616 - val_loss: 0.6957 - val_acc: 0.8788
Epoch 112/1000
142s 284ms/step - loss: 0.7317 - acc: 0.8603 - val_loss: 0.6839 - val_acc: 0.8784
Epoch 113/1000
142s 284ms/step - loss: 0.7245 - acc: 0.8631 - val_loss: 0.7076 - val_acc: 0.8711
Epoch 114/1000
142s 284ms/step - loss: 0.7302 - acc: 0.8622 - val_loss: 0.7022 - val_acc: 0.8759
Epoch 115/1000
142s 284ms/step - loss: 0.7247 - acc: 0.8630 - val_loss: 0.6978 - val_acc: 0.8745
Epoch 116/1000
142s 284ms/step - loss: 0.7179 - acc: 0.8648 - val_loss: 0.6849 - val_acc: 0.8812
Epoch 117/1000
142s 284ms/step - loss: 0.7267 - acc: 0.8636 - val_loss: 0.6885 - val_acc: 0.8771
Epoch 118/1000
142s 284ms/step - loss: 0.7215 - acc: 0.8616 - val_loss: 0.6948 - val_acc: 0.8755
Epoch 119/1000
142s 284ms/step - loss: 0.7246 - acc: 0.8634 - val_loss: 0.7062 - val_acc: 0.8697
Epoch 120/1000
142s 284ms/step - loss: 0.7213 - acc: 0.8641 - val_loss: 0.6994 - val_acc: 0.8754
Epoch 121/1000
142s 284ms/step - loss: 0.7216 - acc: 0.8649 - val_loss: 0.6949 - val_acc: 0.8742
Epoch 122/1000
142s 284ms/step - loss: 0.7252 - acc: 0.8634 - val_loss: 0.6923 - val_acc: 0.8772
Epoch 123/1000
142s 284ms/step - loss: 0.7219 - acc: 0.8639 - val_loss: 0.6769 - val_acc: 0.8797
Epoch 124/1000
142s 284ms/step - loss: 0.7191 - acc: 0.8650 - val_loss: 0.7037 - val_acc: 0.8727
Epoch 125/1000
142s 284ms/step - loss: 0.7196 - acc: 0.8652 - val_loss: 0.6791 - val_acc: 0.8809
Epoch 126/1000
142s 284ms/step - loss: 0.7211 - acc: 0.8651 - val_loss: 0.6945 - val_acc: 0.8768
Epoch 127/1000
142s 284ms/step - loss: 0.7178 - acc: 0.8650 - val_loss: 0.7042 - val_acc: 0.8745
Epoch 128/1000
142s 284ms/step - loss: 0.7214 - acc: 0.8654 - val_loss: 0.6981 - val_acc: 0.8744
Epoch 129/1000
142s 284ms/step - loss: 0.7195 - acc: 0.8652 - val_loss: 0.6753 - val_acc: 0.8834
Epoch 130/1000
142s 284ms/step - loss: 0.7148 - acc: 0.8675 - val_loss: 0.6814 - val_acc: 0.8768
Epoch 131/1000
142s 284ms/step - loss: 0.7188 - acc: 0.8648 - val_loss: 0.6965 - val_acc: 0.8718
Epoch 132/1000
142s 284ms/step - loss: 0.7161 - acc: 0.8661 - val_loss: 0.6995 - val_acc: 0.8713
Epoch 133/1000
142s 284ms/step - loss: 0.7176 - acc: 0.8645 - val_loss: 0.6922 - val_acc: 0.8764
Epoch 134/1000
142s 284ms/step - loss: 0.7151 - acc: 0.8646 - val_loss: 0.6790 - val_acc: 0.8806
Epoch 135/1000
142s 284ms/step - loss: 0.7167 - acc: 0.8644 - val_loss: 0.6733 - val_acc: 0.8828
Epoch 136/1000
142s 284ms/step - loss: 0.7163 - acc: 0.8657 - val_loss: 0.6853 - val_acc: 0.8809
Epoch 137/1000
142s 284ms/step - loss: 0.7088 - acc: 0.8698 - val_loss: 0.6670 - val_acc: 0.8843
Epoch 138/1000
142s 284ms/step - loss: 0.7098 - acc: 0.8662 - val_loss: 0.6837 - val_acc: 0.8793
Epoch 139/1000
142s 284ms/step - loss: 0.7109 - acc: 0.8671 - val_loss: 0.6929 - val_acc: 0.8767
Epoch 140/1000
142s 284ms/step - loss: 0.7109 - acc: 0.8682 - val_loss: 0.6977 - val_acc: 0.8751
Epoch 141/1000
142s 284ms/step - loss: 0.7152 - acc: 0.8666 - val_loss: 0.6836 - val_acc: 0.8769
Epoch 142/1000
142s 284ms/step - loss: 0.7100 - acc: 0.8669 - val_loss: 0.6742 - val_acc: 0.8822
Epoch 143/1000
143s 286ms/step - loss: 0.7144 - acc: 0.8661 - val_loss: 0.6953 - val_acc: 0.8777
Epoch 144/1000
142s 284ms/step - loss: 0.7067 - acc: 0.8692 - val_loss: 0.6899 - val_acc: 0.8761
Epoch 145/1000
142s 284ms/step - loss: 0.7109 - acc: 0.8655 - val_loss: 0.6713 - val_acc: 0.8829
Epoch 146/1000
142s 284ms/step - loss: 0.7063 - acc: 0.8675 - val_loss: 0.7086 - val_acc: 0.8714
Epoch 147/1000
142s 284ms/step - loss: 0.7129 - acc: 0.8666 - val_loss: 0.6727 - val_acc: 0.8836
Epoch 148/1000
142s 284ms/step - loss: 0.7027 - acc: 0.8698 - val_loss: 0.6494 - val_acc: 0.8887
Epoch 149/1000
142s 284ms/step - loss: 0.7073 - acc: 0.8666 - val_loss: 0.6780 - val_acc: 0.8815
Epoch 150/1000
142s 284ms/step - loss: 0.7070 - acc: 0.8700 - val_loss: 0.6805 - val_acc: 0.8806
Epoch 151/1000
142s 284ms/step - loss: 0.7108 - acc: 0.8678 - val_loss: 0.6577 - val_acc: 0.8856
Epoch 152/1000
142s 284ms/step - loss: 0.7040 - acc: 0.8711 - val_loss: 0.6734 - val_acc: 0.8844
Epoch 153/1000
142s 283ms/step - loss: 0.7087 - acc: 0.8688 - val_loss: 0.6897 - val_acc: 0.8765
Epoch 154/1000
142s 284ms/step - loss: 0.7074 - acc: 0.8694 - val_loss: 0.6765 - val_acc: 0.8838
Epoch 155/1000
142s 284ms/step - loss: 0.7035 - acc: 0.8697 - val_loss: 0.6951 - val_acc: 0.8793
Epoch 156/1000
142s 284ms/step - loss: 0.7086 - acc: 0.8694 - val_loss: 0.6608 - val_acc: 0.8847
Epoch 157/1000
142s 284ms/step - loss: 0.7095 - acc: 0.8678 - val_loss: 0.6774 - val_acc: 0.8786
Epoch 158/1000
142s 284ms/step - loss: 0.7077 - acc: 0.8696 - val_loss: 0.6807 - val_acc: 0.8792
Epoch 159/1000
142s 284ms/step - loss: 0.7113 - acc: 0.8687 - val_loss: 0.6760 - val_acc: 0.8847
Epoch 160/1000
142s 284ms/step - loss: 0.7078 - acc: 0.8688 - val_loss: 0.6829 - val_acc: 0.8789
Epoch 161/1000
142s 284ms/step - loss: 0.7034 - acc: 0.8707 - val_loss: 0.6821 - val_acc: 0.8816
Epoch 162/1000
142s 284ms/step - loss: 0.7044 - acc: 0.8685 - val_loss: 0.6610 - val_acc: 0.8828
Epoch 163/1000
142s 284ms/step - loss: 0.6975 - acc: 0.8738 - val_loss: 0.6520 - val_acc: 0.8910
Epoch 164/1000
142s 284ms/step - loss: 0.7046 - acc: 0.8709 - val_loss: 0.6711 - val_acc: 0.8845
Epoch 165/1000
142s 284ms/step - loss: 0.7067 - acc: 0.8699 - val_loss: 0.6878 - val_acc: 0.8732
Epoch 166/1000
142s 284ms/step - loss: 0.7055 - acc: 0.8692 - val_loss: 0.6733 - val_acc: 0.8795
Epoch 167/1000
142s 284ms/step - loss: 0.7055 - acc: 0.8703 - val_loss: 0.6827 - val_acc: 0.8806
Epoch 168/1000
142s 284ms/step - loss: 0.6999 - acc: 0.8719 - val_loss: 0.6782 - val_acc: 0.8779
Epoch 169/1000
142s 284ms/step - loss: 0.7011 - acc: 0.8713 - val_loss: 0.6690 - val_acc: 0.8869
Epoch 170/1000
142s 284ms/step - loss: 0.7037 - acc: 0.8697 - val_loss: 0.6687 - val_acc: 0.8835
Epoch 171/1000
142s 284ms/step - loss: 0.7050 - acc: 0.8687 - val_loss: 0.6669 - val_acc: 0.8845
Epoch 172/1000
142s 284ms/step - loss: 0.6990 - acc: 0.8723 - val_loss: 0.6920 - val_acc: 0.8777
Epoch 173/1000
142s 284ms/step - loss: 0.7064 - acc: 0.8682 - val_loss: 0.6815 - val_acc: 0.8770
Epoch 174/1000
142s 284ms/step - loss: 0.7060 - acc: 0.8685 - val_loss: 0.6752 - val_acc: 0.8814
Epoch 175/1000
142s 284ms/step - loss: 0.7041 - acc: 0.8684 - val_loss: 0.6824 - val_acc: 0.8807
Epoch 176/1000
142s 284ms/step - loss: 0.6979 - acc: 0.8711 - val_loss: 0.6680 - val_acc: 0.8861
Epoch 177/1000
142s 284ms/step - loss: 0.7055 - acc: 0.8709 - val_loss: 0.6766 - val_acc: 0.8774
Epoch 178/1000
142s 284ms/step - loss: 0.7005 - acc: 0.8715 - val_loss: 0.6983 - val_acc: 0.8748
Epoch 179/1000
142s 284ms/step - loss: 0.6979 - acc: 0.8722 - val_loss: 0.6873 - val_acc: 0.8777
Epoch 180/1000
142s 284ms/step - loss: 0.7041 - acc: 0.8692 - val_loss: 0.6644 - val_acc: 0.8874
Epoch 181/1000
142s 284ms/step - loss: 0.6983 - acc: 0.8711 - val_loss: 0.6860 - val_acc: 0.8800
Epoch 182/1000
142s 284ms/step - loss: 0.6964 - acc: 0.8730 - val_loss: 0.6701 - val_acc: 0.8851
Epoch 183/1000
142s 284ms/step - loss: 0.6949 - acc: 0.8740 - val_loss: 0.6826 - val_acc: 0.8826
Epoch 184/1000
142s 284ms/step - loss: 0.6990 - acc: 0.8720 - val_loss: 0.6650 - val_acc: 0.8883
Epoch 185/1000
142s 284ms/step - loss: 0.6946 - acc: 0.8735 - val_loss: 0.6783 - val_acc: 0.8813
Epoch 186/1000
142s 283ms/step - loss: 0.6986 - acc: 0.8737 - val_loss: 0.6683 - val_acc: 0.8848
Epoch 187/1000
142s 284ms/step - loss: 0.6934 - acc: 0.8729 - val_loss: 0.6800 - val_acc: 0.8801
Epoch 188/1000
142s 284ms/step - loss: 0.7006 - acc: 0.8711 - val_loss: 0.6956 - val_acc: 0.8757
Epoch 189/1000
142s 284ms/step - loss: 0.6959 - acc: 0.8712 - val_loss: 0.6650 - val_acc: 0.8876
Epoch 190/1000
142s 284ms/step - loss: 0.6991 - acc: 0.8718 - val_loss: 0.6821 - val_acc: 0.8785
Epoch 191/1000
142s 284ms/step - loss: 0.7015 - acc: 0.8704 - val_loss: 0.6750 - val_acc: 0.8830
Epoch 192/1000
142s 284ms/step - loss: 0.7000 - acc: 0.8715 - val_loss: 0.6775 - val_acc: 0.8804
Epoch 193/1000
142s 284ms/step - loss: 0.6978 - acc: 0.8719 - val_loss: 0.6919 - val_acc: 0.8782
Epoch 194/1000
142s 283ms/step - loss: 0.6958 - acc: 0.8732 - val_loss: 0.6706 - val_acc: 0.8852
Epoch 195/1000
142s 284ms/step - loss: 0.6995 - acc: 0.8717 - val_loss: 0.6769 - val_acc: 0.8802
Epoch 196/1000
142s 284ms/step - loss: 0.6975 - acc: 0.8712 - val_loss: 0.6609 - val_acc: 0.8888
Epoch 197/1000
142s 284ms/step - loss: 0.6955 - acc: 0.8725 - val_loss: 0.6624 - val_acc: 0.8870
Epoch 198/1000
142s 284ms/step - loss: 0.6981 - acc: 0.8726 - val_loss: 0.6550 - val_acc: 0.8912
Epoch 199/1000
142s 284ms/step - loss: 0.6961 - acc: 0.8730 - val_loss: 0.6892 - val_acc: 0.8796
Epoch 200/1000
142s 284ms/step - loss: 0.6936 - acc: 0.8744 - val_loss: 0.6906 - val_acc: 0.8792
Epoch 201/1000
142s 284ms/step - loss: 0.6940 - acc: 0.8746 - val_loss: 0.6571 - val_acc: 0.8881
Epoch 202/1000
142s 284ms/step - loss: 0.6899 - acc: 0.8751 - val_loss: 0.6537 - val_acc: 0.8904
Epoch 203/1000
142s 284ms/step - loss: 0.6970 - acc: 0.8720 - val_loss: 0.6717 - val_acc: 0.8848
Epoch 204/1000
142s 284ms/step - loss: 0.6917 - acc: 0.8743 - val_loss: 0.6643 - val_acc: 0.8850
Epoch 205/1000
142s 284ms/step - loss: 0.6927 - acc: 0.8745 - val_loss: 0.6841 - val_acc: 0.8804
Epoch 206/1000
142s 284ms/step - loss: 0.6957 - acc: 0.8723 - val_loss: 0.6947 - val_acc: 0.8750
Epoch 207/1000
142s 284ms/step - loss: 0.6913 - acc: 0.8760 - val_loss: 0.6755 - val_acc: 0.8827
Epoch 208/1000
142s 284ms/step - loss: 0.6975 - acc: 0.8723 - val_loss: 0.6626 - val_acc: 0.8837
Epoch 209/1000
142s 284ms/step - loss: 0.6920 - acc: 0.8748 - val_loss: 0.6797 - val_acc: 0.8803
Epoch 210/1000
142s 284ms/step - loss: 0.6958 - acc: 0.8737 - val_loss: 0.6869 - val_acc: 0.8791
Epoch 211/1000
142s 284ms/step - loss: 0.6906 - acc: 0.8731 - val_loss: 0.6656 - val_acc: 0.8865
Epoch 212/1000
142s 284ms/step - loss: 0.6946 - acc: 0.8726 - val_loss: 0.6841 - val_acc: 0.8813
Epoch 213/1000
142s 284ms/step - loss: 0.6930 - acc: 0.8738 - val_loss: 0.6858 - val_acc: 0.8770
Epoch 214/1000
142s 284ms/step - loss: 0.6955 - acc: 0.8717 - val_loss: 0.6848 - val_acc: 0.8851
Epoch 215/1000
142s 284ms/step - loss: 0.6964 - acc: 0.8728 - val_loss: 0.6671 - val_acc: 0.8836
Epoch 216/1000
142s 284ms/step - loss: 0.6889 - acc: 0.8743 - val_loss: 0.6633 - val_acc: 0.8885
Epoch 217/1000
142s 284ms/step - loss: 0.6965 - acc: 0.8724 - val_loss: 0.6691 - val_acc: 0.8833
Epoch 218/1000
142s 284ms/step - loss: 0.6906 - acc: 0.8749 - val_loss: 0.6752 - val_acc: 0.8843
Epoch 219/1000
142s 284ms/step - loss: 0.6926 - acc: 0.8733 - val_loss: 0.6759 - val_acc: 0.8821
Epoch 220/1000
142s 284ms/step - loss: 0.6953 - acc: 0.8736 - val_loss: 0.6813 - val_acc: 0.8796
Epoch 221/1000
142s 284ms/step - loss: 0.6904 - acc: 0.8745 - val_loss: 0.6864 - val_acc: 0.8803
Epoch 222/1000
142s 284ms/step - loss: 0.6912 - acc: 0.8754 - val_loss: 0.6892 - val_acc: 0.8775
Epoch 223/1000
142s 284ms/step - loss: 0.6887 - acc: 0.8757 - val_loss: 0.6630 - val_acc: 0.8857
Epoch 224/1000
142s 284ms/step - loss: 0.6940 - acc: 0.8746 - val_loss: 0.6808 - val_acc: 0.8789
Epoch 225/1000
142s 284ms/step - loss: 0.6901 - acc: 0.8739 - val_loss: 0.6795 - val_acc: 0.8786
Epoch 226/1000
142s 284ms/step - loss: 0.6932 - acc: 0.8741 - val_loss: 0.6934 - val_acc: 0.8785
Epoch 227/1000
142s 284ms/step - loss: 0.6949 - acc: 0.8734 - val_loss: 0.6660 - val_acc: 0.8854
Epoch 228/1000
142s 284ms/step - loss: 0.6909 - acc: 0.8758 - val_loss: 0.6684 - val_acc: 0.8836
Epoch 229/1000
142s 284ms/step - loss: 0.6910 - acc: 0.8759 - val_loss: 0.6811 - val_acc: 0.8853
Epoch 230/1000
142s 284ms/step - loss: 0.6958 - acc: 0.8736 - val_loss: 0.6751 - val_acc: 0.8847
Epoch 231/1000
142s 284ms/step - loss: 0.6937 - acc: 0.8742 - val_loss: 0.6626 - val_acc: 0.8904
Epoch 232/1000
142s 284ms/step - loss: 0.6904 - acc: 0.8763 - val_loss: 0.6724 - val_acc: 0.8850
Epoch 233/1000
142s 284ms/step - loss: 0.6860 - acc: 0.8769 - val_loss: 0.6722 - val_acc: 0.8854
Epoch 234/1000
142s 284ms/step - loss: 0.6957 - acc: 0.8731 - val_loss: 0.6722 - val_acc: 0.8829
Epoch 235/1000
142s 284ms/step - loss: 0.6909 - acc: 0.8755 - val_loss: 0.6749 - val_acc: 0.8835
Epoch 236/1000
142s 284ms/step - loss: 0.6891 - acc: 0.8758 - val_loss: 0.6551 - val_acc: 0.8885
Epoch 237/1000
142s 284ms/step - loss: 0.6888 - acc: 0.8742 - val_loss: 0.6953 - val_acc: 0.8778
Epoch 238/1000
142s 284ms/step - loss: 0.6907 - acc: 0.8760 - val_loss: 0.6752 - val_acc: 0.8844
Epoch 239/1000
142s 284ms/step - loss: 0.6894 - acc: 0.8764 - val_loss: 0.6801 - val_acc: 0.8820
Epoch 240/1000
142s 284ms/step - loss: 0.6893 - acc: 0.8761 - val_loss: 0.6842 - val_acc: 0.8816
Epoch 241/1000
142s 284ms/step - loss: 0.6895 - acc: 0.8754 - val_loss: 0.6722 - val_acc: 0.8817
Epoch 242/1000
142s 284ms/step - loss: 0.6895 - acc: 0.8767 - val_loss: 0.6942 - val_acc: 0.8757
Epoch 243/1000
142s 284ms/step - loss: 0.6934 - acc: 0.8734 - val_loss: 0.6603 - val_acc: 0.8851
Epoch 244/1000
141s 283ms/step - loss: 0.6851 - acc: 0.8772 - val_loss: 0.6947 - val_acc: 0.8764
Epoch 245/1000
142s 283ms/step - loss: 0.6875 - acc: 0.8759 - val_loss: 0.6707 - val_acc: 0.8863
Epoch 246/1000
142s 284ms/step - loss: 0.6858 - acc: 0.8747 - val_loss: 0.6729 - val_acc: 0.8814
Epoch 247/1000
142s 284ms/step - loss: 0.6881 - acc: 0.8778 - val_loss: 0.6919 - val_acc: 0.8765
Epoch 248/1000
142s 284ms/step - loss: 0.6844 - acc: 0.8776 - val_loss: 0.6899 - val_acc: 0.8821
Epoch 249/1000
142s 284ms/step - loss: 0.6890 - acc: 0.8763 - val_loss: 0.6534 - val_acc: 0.8901
Epoch 250/1000
142s 284ms/step - loss: 0.6825 - acc: 0.8784 - val_loss: 0.6682 - val_acc: 0.8849
Epoch 251/1000
142s 284ms/step - loss: 0.6847 - acc: 0.8777 - val_loss: 0.6655 - val_acc: 0.8860
Epoch 252/1000
142s 284ms/step - loss: 0.6814 - acc: 0.8791 - val_loss: 0.6657 - val_acc: 0.8860
Epoch 253/1000
142s 284ms/step - loss: 0.6873 - acc: 0.8742 - val_loss: 0.6804 - val_acc: 0.8793
Epoch 254/1000
142s 284ms/step - loss: 0.6887 - acc: 0.8754 - val_loss: 0.6719 - val_acc: 0.8835
Epoch 255/1000
142s 284ms/step - loss: 0.6847 - acc: 0.8764 - val_loss: 0.6631 - val_acc: 0.8857
Epoch 256/1000
142s 284ms/step - loss: 0.6896 - acc: 0.8743 - val_loss: 0.6694 - val_acc: 0.8846
Epoch 257/1000
142s 284ms/step - loss: 0.6900 - acc: 0.8756 - val_loss: 0.6771 - val_acc: 0.8810
Epoch 258/1000
142s 284ms/step - loss: 0.6860 - acc: 0.8764 - val_loss: 0.6694 - val_acc: 0.8843
Epoch 259/1000
142s 284ms/step - loss: 0.6875 - acc: 0.8786 - val_loss: 0.6747 - val_acc: 0.8807
Epoch 260/1000
142s 284ms/step - loss: 0.6857 - acc: 0.8768 - val_loss: 0.6458 - val_acc: 0.8938
Epoch 261/1000
142s 284ms/step - loss: 0.6880 - acc: 0.8771 - val_loss: 0.6855 - val_acc: 0.8788
Epoch 262/1000
142s 284ms/step - loss: 0.6839 - acc: 0.8777 - val_loss: 0.6723 - val_acc: 0.8851
Epoch 263/1000
142s 284ms/step - loss: 0.6819 - acc: 0.8783 - val_loss: 0.6738 - val_acc: 0.8845
Epoch 264/1000
142s 284ms/step - loss: 0.6867 - acc: 0.8784 - val_loss: 0.6809 - val_acc: 0.8790
Epoch 265/1000
142s 284ms/step - loss: 0.6805 - acc: 0.8810 - val_loss: 0.6750 - val_acc: 0.8846
Epoch 266/1000
141s 283ms/step - loss: 0.6809 - acc: 0.8781 - val_loss: 0.6584 - val_acc: 0.8878
Epoch 267/1000
142s 283ms/step - loss: 0.6944 - acc: 0.8722 - val_loss: 0.6598 - val_acc: 0.8875
Epoch 268/1000
141s 283ms/step - loss: 0.6847 - acc: 0.8779 - val_loss: 0.6825 - val_acc: 0.8817
Epoch 269/1000
141s 283ms/step - loss: 0.6824 - acc: 0.8786 - val_loss: 0.6552 - val_acc: 0.8908
Epoch 270/1000
141s 283ms/step - loss: 0.6830 - acc: 0.8783 - val_loss: 0.6820 - val_acc: 0.8767
Epoch 271/1000
141s 283ms/step - loss: 0.6903 - acc: 0.8752 - val_loss: 0.6685 - val_acc: 0.8855
Epoch 272/1000
141s 283ms/step - loss: 0.6861 - acc: 0.8760 - val_loss: 0.6707 - val_acc: 0.8873
Epoch 273/1000
142s 283ms/step - loss: 0.6823 - acc: 0.8782 - val_loss: 0.6721 - val_acc: 0.8864
Epoch 274/1000
141s 283ms/step - loss: 0.6862 - acc: 0.8769 - val_loss: 0.6764 - val_acc: 0.8866
Epoch 275/1000
141s 283ms/step - loss: 0.6825 - acc: 0.8785 - val_loss: 0.6673 - val_acc: 0.8861
Epoch 276/1000
142s 283ms/step - loss: 0.6842 - acc: 0.8771 - val_loss: 0.6757 - val_acc: 0.8835
Epoch 277/1000
142s 283ms/step - loss: 0.6855 - acc: 0.8777 - val_loss: 0.6769 - val_acc: 0.8814
Epoch 278/1000
142s 284ms/step - loss: 0.6793 - acc: 0.8802 - val_loss: 0.6618 - val_acc: 0.8883
Epoch 279/1000
142s 284ms/step - loss: 0.6854 - acc: 0.8766 - val_loss: 0.6965 - val_acc: 0.8743
Epoch 280/1000
142s 284ms/step - loss: 0.6824 - acc: 0.8792 - val_loss: 0.6720 - val_acc: 0.8842
Epoch 281/1000
142s 284ms/step - loss: 0.6786 - acc: 0.8790 - val_loss: 0.6589 - val_acc: 0.8883
Epoch 282/1000
142s 284ms/step - loss: 0.6781 - acc: 0.8797 - val_loss: 0.6620 - val_acc: 0.8862
Epoch 283/1000
142s 284ms/step - loss: 0.6845 - acc: 0.8786 - val_loss: 0.6936 - val_acc: 0.8802
Epoch 284/1000
142s 284ms/step - loss: 0.6866 - acc: 0.8772 - val_loss: 0.6678 - val_acc: 0.8890
Epoch 285/1000
142s 284ms/step - loss: 0.6829 - acc: 0.8787 - val_loss: 0.6630 - val_acc: 0.8866
Epoch 286/1000
142s 284ms/step - loss: 0.6763 - acc: 0.8796 - val_loss: 0.6597 - val_acc: 0.8893
Epoch 287/1000
142s 284ms/step - loss: 0.6833 - acc: 0.8774 - val_loss: 0.6752 - val_acc: 0.8866
Epoch 288/1000
142s 284ms/step - loss: 0.6858 - acc: 0.8768 - val_loss: 0.6617 - val_acc: 0.8902
Epoch 289/1000
142s 284ms/step - loss: 0.6784 - acc: 0.8799 - val_loss: 0.6634 - val_acc: 0.8872
Epoch 290/1000
142s 284ms/step - loss: 0.6807 - acc: 0.8778 - val_loss: 0.6564 - val_acc: 0.8896
Epoch 291/1000
142s 284ms/step - loss: 0.6835 - acc: 0.8769 - val_loss: 0.6628 - val_acc: 0.8877
Epoch 292/1000
142s 284ms/step - loss: 0.6783 - acc: 0.8798 - val_loss: 0.6887 - val_acc: 0.8813
Epoch 293/1000
142s 284ms/step - loss: 0.6795 - acc: 0.8810 - val_loss: 0.6590 - val_acc: 0.8899
Epoch 294/1000
142s 284ms/step - loss: 0.6799 - acc: 0.8798 - val_loss: 0.6599 - val_acc: 0.8873
Epoch 295/1000
142s 284ms/step - loss: 0.6856 - acc: 0.8792 - val_loss: 0.6636 - val_acc: 0.8880
Epoch 296/1000
142s 284ms/step - loss: 0.6832 - acc: 0.8802 - val_loss: 0.6513 - val_acc: 0.8926
Epoch 297/1000
142s 284ms/step - loss: 0.6785 - acc: 0.8794 - val_loss: 0.6568 - val_acc: 0.8886
Epoch 298/1000
142s 284ms/step - loss: 0.6832 - acc: 0.8782 - val_loss: 0.6697 - val_acc: 0.8872
Epoch 299/1000
142s 284ms/step - loss: 0.6771 - acc: 0.8813 - val_loss: 0.6714 - val_acc: 0.8825
Epoch 300/1000
142s 285ms/step - loss: 0.6814 - acc: 0.8784 - val_loss: 0.6857 - val_acc: 0.8821
Epoch 301/1000
lr changed to 0.010000000149011612
142s 284ms/step - loss: 0.5714 - acc: 0.9156 - val_loss: 0.5648 - val_acc: 0.9171
Epoch 302/1000
142s 284ms/step - loss: 0.5073 - acc: 0.9362 - val_loss: 0.5481 - val_acc: 0.9236
Epoch 303/1000
142s 284ms/step - loss: 0.4913 - acc: 0.9412 - val_loss: 0.5391 - val_acc: 0.9228
Epoch 304/1000
142s 284ms/step - loss: 0.4714 - acc: 0.9455 - val_loss: 0.5304 - val_acc: 0.9255
Epoch 305/1000
142s 285ms/step - loss: 0.4592 - acc: 0.9481 - val_loss: 0.5223 - val_acc: 0.9253
Epoch 306/1000
142s 284ms/step - loss: 0.4452 - acc: 0.9512 - val_loss: 0.5173 - val_acc: 0.9271
Epoch 307/1000
142s 284ms/step - loss: 0.4350 - acc: 0.9520 - val_loss: 0.5130 - val_acc: 0.9272
Epoch 308/1000
142s 285ms/step - loss: 0.4268 - acc: 0.9528 - val_loss: 0.5095 - val_acc: 0.9247
Epoch 309/1000
142s 284ms/step - loss: 0.4178 - acc: 0.9562 - val_loss: 0.5078 - val_acc: 0.9272
Epoch 310/1000
142s 284ms/step - loss: 0.4143 - acc: 0.9540 - val_loss: 0.5075 - val_acc: 0.9279
Epoch 311/1000
142s 284ms/step - loss: 0.4027 - acc: 0.9576 - val_loss: 0.4964 - val_acc: 0.9266
Epoch 312/1000
142s 284ms/step - loss: 0.3964 - acc: 0.9572 - val_loss: 0.4957 - val_acc: 0.9264
Epoch 313/1000
142s 285ms/step - loss: 0.3920 - acc: 0.9581 - val_loss: 0.4919 - val_acc: 0.9276
Epoch 314/1000
142s 284ms/step - loss: 0.3829 - acc: 0.9602 - val_loss: 0.4879 - val_acc: 0.9271
Epoch 315/1000
142s 284ms/step - loss: 0.3751 - acc: 0.9609 - val_loss: 0.4864 - val_acc: 0.9285
Epoch 316/1000
142s 284ms/step - loss: 0.3736 - acc: 0.9605 - val_loss: 0.4832 - val_acc: 0.9264
Epoch 317/1000
142s 284ms/step - loss: 0.3669 - acc: 0.9609 - val_loss: 0.4763 - val_acc: 0.9280
Epoch 318/1000
142s 284ms/step - loss: 0.3610 - acc: 0.9625 - val_loss: 0.4739 - val_acc: 0.9295
...
Epoch 861/1000
142s 284ms/step - loss: 0.1070 - acc: 0.9982 - val_loss: 0.3575 - val_acc: 0.9367
Epoch 862/1000
142s 284ms/step - loss: 0.1074 - acc: 0.9980 - val_loss: 0.3581 - val_acc: 0.9357
Epoch 863/1000
142s 284ms/step - loss: 0.1070 - acc: 0.9982 - val_loss: 0.3527 - val_acc: 0.9374
Epoch 864/1000
142s 284ms/step - loss: 0.1063 - acc: 0.9984 - val_loss: 0.3543 - val_acc: 0.9374
Epoch 865/1000
142s 284ms/step - loss: 0.1057 - acc: 0.9986 - val_loss: 0.3533 - val_acc: 0.9377
Epoch 866/1000
142s 285ms/step - loss: 0.1062 - acc: 0.9978 - val_loss: 0.3545 - val_acc: 0.9369
Epoch 867/1000
142s 284ms/step - loss: 0.1054 - acc: 0.9984 - val_loss: 0.3542 - val_acc: 0.9355
Epoch 868/1000
142s 284ms/step - loss: 0.1060 - acc: 0.9983 - val_loss: 0.3482 - val_acc: 0.9394
Epoch 869/1000
142s 285ms/step - loss: 0.1054 - acc: 0.9984 - val_loss: 0.3560 - val_acc: 0.9375
Epoch 870/1000
142s 284ms/step - loss: 0.1064 - acc: 0.9978 - val_loss: 0.3537 - val_acc: 0.9370
Epoch 871/1000
142s 284ms/step - loss: 0.1050 - acc: 0.9984 - val_loss: 0.3555 - val_acc: 0.9374
Epoch 872/1000
142s 284ms/step - loss: 0.1049 - acc: 0.9985 - val_loss: 0.3539 - val_acc: 0.9367
Epoch 873/1000
142s 284ms/step - loss: 0.1050 - acc: 0.9984 - val_loss: 0.3574 - val_acc: 0.9373
Epoch 874/1000
143s 285ms/step - loss: 0.1044 - acc: 0.9987 - val_loss: 0.3623 - val_acc: 0.9359
Epoch 875/1000
142s 283ms/step - loss: 0.1048 - acc: 0.9982 - val_loss: 0.3600 - val_acc: 0.9370
Epoch 876/1000
142s 284ms/step - loss: 0.1051 - acc: 0.9982 - val_loss: 0.3594 - val_acc: 0.9366
Epoch 877/1000
142s 284ms/step - loss: 0.1042 - acc: 0.9985 - val_loss: 0.3558 - val_acc: 0.9357
Epoch 878/1000
142s 284ms/step - loss: 0.1046 - acc: 0.9982 - val_loss: 0.3549 - val_acc: 0.9360
Epoch 879/1000
142s 284ms/step - loss: 0.1042 - acc: 0.9984 - val_loss: 0.3520 - val_acc: 0.9385
Epoch 880/1000
142s 285ms/step - loss: 0.1040 - acc: 0.9984 - val_loss: 0.3598 - val_acc: 0.9367
Epoch 881/1000
142s 285ms/step - loss: 0.1036 - acc: 0.9984 - val_loss: 0.3550 - val_acc: 0.9364
Epoch 882/1000
142s 284ms/step - loss: 0.1031 - acc: 0.9985 - val_loss: 0.3544 - val_acc: 0.9381
Epoch 883/1000
142s 285ms/step - loss: 0.1042 - acc: 0.9981 - val_loss: 0.3513 - val_acc: 0.9380
Epoch 884/1000
142s 284ms/step - loss: 0.1036 - acc: 0.9982 - val_loss: 0.3541 - val_acc: 0.9364
Epoch 885/1000
142s 284ms/step - loss: 0.1033 - acc: 0.9985 - val_loss: 0.3532 - val_acc: 0.9376
Epoch 886/1000
142s 284ms/step - loss: 0.1032 - acc: 0.9981 - val_loss: 0.3566 - val_acc: 0.9376
Epoch 887/1000
142s 284ms/step - loss: 0.1033 - acc: 0.9981 - val_loss: 0.3518 - val_acc: 0.9368
Epoch 888/1000
142s 285ms/step - loss: 0.1020 - acc: 0.9987 - val_loss: 0.3521 - val_acc: 0.9378
Epoch 889/1000
142s 284ms/step - loss: 0.1020 - acc: 0.9984 - val_loss: 0.3524 - val_acc: 0.9368
Epoch 890/1000
142s 284ms/step - loss: 0.1024 - acc: 0.9983 - val_loss: 0.3523 - val_acc: 0.9364
Epoch 891/1000
142s 284ms/step - loss: 0.1029 - acc: 0.9983 - val_loss: 0.3582 - val_acc: 0.9355
Epoch 892/1000
142s 284ms/step - loss: 0.1018 - acc: 0.9984 - val_loss: 0.3555 - val_acc: 0.9365
Epoch 893/1000
142s 284ms/step - loss: 0.1021 - acc: 0.9985 - val_loss: 0.3559 - val_acc: 0.9367
Epoch 894/1000
142s 284ms/step - loss: 0.1026 - acc: 0.9977 - val_loss: 0.3563 - val_acc: 0.9360
Epoch 895/1000
142s 284ms/step - loss: 0.1027 - acc: 0.9980 - val_loss: 0.3575 - val_acc: 0.9365
Epoch 896/1000
142s 284ms/step - loss: 0.1023 - acc: 0.9980 - val_loss: 0.3541 - val_acc: 0.9375
Epoch 897/1000
142s 284ms/step - loss: 0.1016 - acc: 0.9982 - val_loss: 0.3518 - val_acc: 0.9372
Epoch 898/1000
142s 285ms/step - loss: 0.1018 - acc: 0.9979 - val_loss: 0.3473 - val_acc: 0.9372
Epoch 899/1000
142s 284ms/step - loss: 0.1014 - acc: 0.9986 - val_loss: 0.3507 - val_acc: 0.9376
Epoch 900/1000
142s 284ms/step - loss: 0.1010 - acc: 0.9985 - val_loss: 0.3568 - val_acc: 0.9366
Epoch 901/1000
lr changed to 9.999999310821295e-05
142s 284ms/step - loss: 0.1014 - acc: 0.9982 - val_loss: 0.3548 - val_acc: 0.9366
Epoch 902/1000
142s 284ms/step - loss: 0.1009 - acc: 0.9983 - val_loss: 0.3535 - val_acc: 0.9372
Epoch 903/1000
142s 284ms/step - loss: 0.1008 - acc: 0.9981 - val_loss: 0.3523 - val_acc: 0.9370
Epoch 904/1000
142s 284ms/step - loss: 0.1002 - acc: 0.9986 - val_loss: 0.3526 - val_acc: 0.9375
Epoch 905/1000
142s 285ms/step - loss: 0.1000 - acc: 0.9987 - val_loss: 0.3519 - val_acc: 0.9372
Epoch 906/1000
142s 284ms/step - loss: 0.0997 - acc: 0.9989 - val_loss: 0.3520 - val_acc: 0.9374
Epoch 907/1000
142s 284ms/step - loss: 0.0999 - acc: 0.9989 - val_loss: 0.3520 - val_acc: 0.9377
Epoch 908/1000
142s 284ms/step - loss: 0.0994 - acc: 0.9989 - val_loss: 0.3518 - val_acc: 0.9376
Epoch 909/1000
142s 284ms/step - loss: 0.0991 - acc: 0.9990 - val_loss: 0.3520 - val_acc: 0.9378
Epoch 910/1000
142s 284ms/step - loss: 0.0996 - acc: 0.9988 - val_loss: 0.3515 - val_acc: 0.9375
Epoch 911/1000
142s 284ms/step - loss: 0.0990 - acc: 0.9990 - val_loss: 0.3513 - val_acc: 0.9372
Epoch 912/1000
142s 284ms/step - loss: 0.0994 - acc: 0.9987 - val_loss: 0.3508 - val_acc: 0.9371
Epoch 913/1000
142s 284ms/step - loss: 0.0997 - acc: 0.9988 - val_loss: 0.3510 - val_acc: 0.9373
Epoch 914/1000
142s 284ms/step - loss: 0.0996 - acc: 0.9989 - val_loss: 0.3509 - val_acc: 0.9374
Epoch 915/1000
142s 284ms/step - loss: 0.1001 - acc: 0.9986 - val_loss: 0.3513 - val_acc: 0.9375
Epoch 916/1000
142s 284ms/step - loss: 0.0991 - acc: 0.9990 - val_loss: 0.3508 - val_acc: 0.9388
Epoch 917/1000
142s 284ms/step - loss: 0.0987 - acc: 0.9989 - val_loss: 0.3512 - val_acc: 0.9377
Epoch 918/1000
142s 284ms/step - loss: 0.0990 - acc: 0.9988 - val_loss: 0.3510 - val_acc: 0.9381
Epoch 919/1000
142s 284ms/step - loss: 0.0997 - acc: 0.9986 - val_loss: 0.3515 - val_acc: 0.9380
Epoch 920/1000
142s 284ms/step - loss: 0.0993 - acc: 0.9987 - val_loss: 0.3519 - val_acc: 0.9379
...
Epoch 982/1000
142s 284ms/step - loss: 0.0977 - acc: 0.9990 - val_loss: 0.3512 - val_acc: 0.9391
Epoch 983/1000
142s 284ms/step - loss: 0.0978 - acc: 0.9988 - val_loss: 0.3503 - val_acc: 0.9389
Epoch 984/1000
142s 285ms/step - loss: 0.0975 - acc: 0.9991 - val_loss: 0.3503 - val_acc: 0.9383
Epoch 985/1000
142s 284ms/step - loss: 0.0977 - acc: 0.9989 - val_loss: 0.3497 - val_acc: 0.9388
Epoch 986/1000
142s 284ms/step - loss: 0.0977 - acc: 0.9990 - val_loss: 0.3498 - val_acc: 0.9390
Epoch 987/1000
142s 284ms/step - loss: 0.0972 - acc: 0.9992 - val_loss: 0.3502 - val_acc: 0.9382
Epoch 988/1000
142s 284ms/step - loss: 0.0973 - acc: 0.9991 - val_loss: 0.3506 - val_acc: 0.9391
Epoch 989/1000
142s 284ms/step - loss: 0.0977 - acc: 0.9989 - val_loss: 0.3504 - val_acc: 0.9396
Epoch 990/1000
142s 284ms/step - loss: 0.0978 - acc: 0.9990 - val_loss: 0.3502 - val_acc: 0.9393
Epoch 991/1000
142s 284ms/step - loss: 0.0976 - acc: 0.9988 - val_loss: 0.3501 - val_acc: 0.9391
Epoch 992/1000
142s 284ms/step - loss: 0.0973 - acc: 0.9992 - val_loss: 0.3500 - val_acc: 0.9386
Epoch 993/1000
142s 284ms/step - loss: 0.0970 - acc: 0.9992 - val_loss: 0.3497 - val_acc: 0.9387
Epoch 994/1000
142s 284ms/step - loss: 0.0973 - acc: 0.9990 - val_loss: 0.3499 - val_acc: 0.9391
Epoch 995/1000
142s 284ms/step - loss: 0.0978 - acc: 0.9988 - val_loss: 0.3500 - val_acc: 0.9397
Epoch 996/1000
142s 284ms/step - loss: 0.0975 - acc: 0.9991 - val_loss: 0.3500 - val_acc: 0.9392
Epoch 997/1000
142s 284ms/step - loss: 0.0975 - acc: 0.9990 - val_loss: 0.3495 - val_acc: 0.9393
Epoch 998/1000
142s 285ms/step - loss: 0.0980 - acc: 0.9988 - val_loss: 0.3498 - val_acc: 0.9386
Epoch 999/1000
142s 284ms/step - loss: 0.0976 - acc: 0.9991 - val_loss: 0.3490 - val_acc: 0.9382
Epoch 1000/1000
142s 285ms/step - loss: 0.0974 - acc: 0.9990 - val_loss: 0.3497 - val_acc: 0.9385
Train loss: 0.09523774388432503
Train accuracy: 0.9995200004577637
Test loss: 0.34968149244785307
Test accuracy: 0.938500000834465

准确率略有提升,但是这是以残差模块的数量翻了一倍为代价的,运算时间长了很多,似乎没有必要这么多层。

本身网络就比较复杂了,还有那么多层,也加大了训练难度。

Minghang Zhao, Shisheng Zhong, Xuyun Fu, Baoping Tang, Shaojiang Dong, Michael Pecht, Deep Residual Networks with Adaptively Parametric Rectifier Linear Units for Fault Diagnosis, IEEE Transactions on Industrial Electronics, DOI: 10.1109/TIE.2020.2972458, Date of Publication: 13 February 2020

https://ieeexplore.ieee.org/document/8998530

0 人点赞