title: getting inf while calculating continuous entropy over each row of the tensor values
body: <p>I am trying to calculate <code>continuous entropy</code> over a tensor which I received <code>-inf</code> most of the times as my numbers are too small in the tensor:</p>
  
  <p><code>tf.Tensor([-inf -inf -inf -inf -inf -inf -inf], shape=(7,), dtype=float32)</code></p>
  
  <p>And this is a subsample of tensor I have:</p>
  
  <pre><code>tf_ent = tf.constant([  [0.096,    -0.00065,  0.99,    0.01   ],
                          [0.097,      0.033,     0.025,     0.005   ],
                          [0.009,     0.0001,    0.0009,    0.0033],
                          [0.00060,   0.001,    0.03,     0.0005 ],
                          [0.0049,   -0.08,    -0.05,    -0.00036],
                          [0.09  ,   -0.45,     0.087,    0.0023 ],
                          [0.3,      -0.23,     0.82,    -0.28   ]])
  </code></pre>
  
  <p>And this is the way I calculate continuous entropy on <code>each</code> sample of this tensor:</p>
  
  <pre><code>import  tensorflow as tf
  import math
  tf.enable_eager_execution()
  
  def score(X):
      def entropy(data):
          if data is not None:
              data = tf.reshape(data, shape=[1, -1])
              num_samples = data.shape[0]
              if len(data.shape) == 1:
                  num_dimensions = 1
              else:
                  num_dimensions = data.shape[1]
              detCov = tf.linalg.det(tf.cast(tf.matmul(data, tf.transpose(data)),tf.int32)/tf.cast(num_samples,tf.int32))
              normalization = tf.math.pow(tf.cast((tf.math.multiply(2, tf.math.multiply(np.pi, tf.math.exp(1.0)))),tf.int32), num_dimensions)
              if detCov == 0:
                  return -np.inf
              else:
                  return 0.5 * tf.math.log(tf.math.multiply(tf.cast(normalization,tf.float32),tf.cast(detCov, tf.float32)))
      rev = tf.map_fn(entropy, X, dtype=tf.float32)
      return rev
  
  ent_p = score(tf_ent)
  </code></pre>
  
  <p>So my question here is that, Is it ok if I multiple all the elements in the tensor by say <code>10000</code>, So I will get a score per row for the most of my rows? 
  Or it might not make sense conceptually?</p>