I can\'t get TensorFlow RELU activations (neither tf.nn.relu
nor tf.nn.relu6
) working without NaN values for activations and weights killing my trainin
If you use a softmax classifier at the top of your network, try to make the initial weights of the layer just below the softmax very small (e.g. std=1e-4). This makes the initial distribution of outputs of the network very soft (high temperature), and helps ensure that the first few steps of your optimization are not too large and numerically unstable.