How can one get a differentiable histogram function in tensorflow. I want to use the histogram of images to calculate a particular loss function. But the histogram function provided by tensorflow, tf.histogram_fixed_width() are not differentiable. How can I go about this ?