# Difference in log base for cross entropy calcuation

I have started going through the TensorFlow tutorials here and I have a small question about the cross entropy calculations. Most places I have seen cross entropy calculated using base 2 log, but the tf.log is base e. Under what conditions would using one log base be preferred over the other?

• Makes no difference if used consistently. – Carl Jul 30 '17 at 2:12

$$\frac{\log_e{n}}{\log_2{n}} = \frac{\log_e{2}}{\log_e e} = \log_e 2$$