machine-learning - 神经网络的初始偏差值

标签 machine-learning tensorflow bias-neuron

我目前正在 tensorflow 中构建 CNN,并使用 He 正常权重初始化来初始化我的权重矩阵。但是,我不确定应该如何初始化我的偏差值。我使用 ReLU 作为每个卷积层之间的激活函数。是否有初始化偏差值的标准方法?

# Define approximate xavier weight initialization (with RelU correction described by He)
def xavier_over_two(shape):
    std = np.sqrt(shape[0] * shape[1] * shape[2])
    return tf.random_normal(shape, stddev=std)

def bias_init(shape):
    return #???

最佳答案

Initializing the biases. It is possible and common to initialize the biases to be zero, since the asymmetry breaking is provided by the small random numbers in the weights. For ReLU non-linearities, some people like to use small constant value such as 0.01 for all biases because this ensures that all ReLU units fire in the beginning and therefore obtain and propagate some gradient. However, it is not clear if this provides a consistent improvement (in fact some results seem to indicate that this performs worse) and it is more common to simply use 0 bias initialization.

来源:http://cs231n.github.io/neural-networks-2/

关于machine-learning - 神经网络的初始偏差值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44883861/

相关文章:

python - 为什么使用 TensorFlow 计算简单线性回归时得到 [nan]?

c++ - 我怎么知道使用caffe framwork和c++程序的层中是否不存在偏差

python-3.x - 从一组列表中访问特定列表

python - 二次项线性回归

java - 是否可以从 Java 应用程序以 GPU 模式运行 TensorFlow?

tensorflow - CTC_损失错误 "No valid path found."

machine-learning - 每个神经元的神经网络偏差

Python:从列表创建术语文档矩阵

python - 训练 CNN 后准确率较低