title: Tensorflow log-likelihood for two probability vectors which might contain zeros
body: <p>Suppose I have two tensors,  <code>p1</code> and <code>p2</code> in tensorflow of the same shape which contain probilities, some of which might be zero or one. Is their and elegant way of calculating the log-likelihood pointwise: <code>p1*log(p2) + (1-p1)*log(1-p2)</code>?</p>
  
  <p>Implementing it naively using the tensorflow functions</p>
  
  <pre><code>p1*tf.log(p2) + (1-p1)*tf.log(1-p2)
  </code></pre>
  
  <p>risks calling <code>0*tf.log(0)</code> which will give a <code>nan</code>.  </p>