我正在尝试在 Keras 中实现这篇论文:https : //arxiv.org/pdf/1603.09056.pdf,它使用带有跳过连接的 Conv-Deconv 来创建图像去噪网络。如果我在相应的 Conv-Deconv 层之间建立对称跳过连接,我的网络运行良好,但如果我在输入和输出之间添加连接(如论文中所示),我的网络就无法训练。是我看不懂论文吗?
“但是,我们的网络从输入中学习附加损坏,因为网络的输入和输出之间存在跳跃连接”
这是论文中描述的网络:
这是我的网络:
input_img = Input(shape=(None,None,3))
############################
####### CONVOLUTIONS #######
############################
c1 = Convolution2D(64, (3, 3))(input_img)
a1 = Activation('relu')(c1)
c2 = Convolution2D(64, (3, 3))(a1)
a2 = Activation('relu')(c2)
c3 = Convolution2D(64, (3, 3))(a2)
a3 = Activation('relu')(c3)
c4 = Convolution2D(64, (3, 3))(a3)
a4 = Activation('relu')(c4)
c5 = Convolution2D(64, (3, 3))(a4)
a5 = Activation('relu')(c5)
############################
###### DECONVOLUTIONS ######
############################
d1 = Conv2DTranspose(64, (3, 3))(a5)
a6 = Activation('relu')(d1)
m1 = add([a4, a6])
a7 = Activation('relu')(m1)
d2 = Conv2DTranspose(64, (3, 3))(a7)
a8 = Activation('relu')(d2)
m2 = add([a3, a8])
a9 = Activation('relu')(m2)
d3 = Conv2DTranspose(64, (3, 3))(a9)
a10 = Activation('relu')(d3)
m3 = add([a2, a10])
a11 = Activation('relu')(m3)
d4 = Conv2DTranspose(64, (3, 3))(a11)
a12 = Activation('relu')(d4)
m4 = add([a1, a12])
a13 = Activation('relu')(m4)
d5 = Conv2DTranspose(3, (3, 3))(a13)
a14 = Activation('relu')(d5)
m5 = add([input_img, a14]) # Everything goes well without this line
out = Activation('relu')(m5)
model = Model(input_img, out)
model.compile(optimizer='adam', loss='mse')
如果我训练它,这就是我得到的:
Epoch 1/10
31250/31257 [============================>.] - ETA: 0s - loss: 0.0015
Current PSNR: 28.1152534485
31257/31257 [==============================] - 89s - loss: 0.0015 - val_loss: 0.0015
Epoch 2/10
31250/31257 [============================>.] - ETA: 0s - loss: 0.0015
Current PSNR: 28.1152534485
31257/31257 [==============================] - 89s - loss: 0.0015 - val_loss: 0.0015
Epoch 3/10
31250/31257 [============================>.] - ETA: 0s - loss: 0.0015
Current PSNR: 28.1152534485
31257/31257 [==============================] - 89s - loss: 0.0015 - val_loss: 0.0015
Epoch 4/10
31250/31257 [============================>.] - ETA: 0s - loss: 0.0015
Current PSNR: 28.1152534485
31257/31257 [==============================] - 89s - loss: 0.0015 - val_loss: 0.0015
Epoch 5/10
31250/31257 [============================>.] - ETA: 0s - loss: 0.0015
Current PSNR: 28.1152534485
我的网络有什么问题?