【发布时间】:2018-08-16 03:33:19
【问题描述】:
我正在使用 TensorFlow 解决多目标回归问题。具体来说,在一个完全卷积的残差网络中,用于逐像素标记,输入是图像,标签是掩码。在我的例子中,我使用大脑 MR 作为图像,标签是肿瘤的面具。
虽然我确信仍有改进的余地。因此,我想添加批量标准化。我实现如下:
# Convolutional Layer 1
Z10 = tf.nn.conv2d(X, W_conv10, strides = [1, 1, 1, 1], padding='SAME')
Z10 = tf.contrib.layers.batch_norm(Z10, center=True, scale=True, is_training = train_flag)
A10 = tf.nn.relu(Z10)
Z1 = tf.nn.conv2d(Z10, W_conv1, strides = [1, 2, 2, 1], padding='SAME')
Z1 = tf.contrib.layers.batch_norm(Z1, center=True, scale=True, is_training = train_flag)
A1 = tf.nn.relu(Z1)
对于我网络的每个转换层和转置层。但结果不是我所期望的。具有批量标准化的网络性能很差。橙色是没有批量标准化的网络损失,而蓝色有它:
不仅网络学习速度较慢,使用批量标准化的网络中预测的标签也非常糟糕。
有人知道为什么会这样吗? 这可能是我的成本函数吗?我目前正在使用
loss = tf.nn.sigmoid_cross_entropy_with_logits(logits = dA1, labels = Y)
cost = tf.reduce_mean(loss)
【问题讨论】:
标签: tensorflow deep-learning image-segmentation batch-normalization