I need to write a simple initializer for my convolutional layer biases. I am using tf.slim so I can specify the initializer when calling the convolutional layer, like so.

I want to replace the biases_initializer=init_ops.zeros_initializer() with my own custom function that just initializes the bias to a given constant, for example :

`biases_initializer=custom_initializer(value)`

where I can specify the value, for example value = -5 .

Can anyone show me how this is done? I've spent about an hour reading through the existing initializers, but still don't know how to implement this simple function.