Commit 72b92796 authored by Brian Patton's avatar Brian Patton Committed by TensorFlower Gardener
Browse files

Specify a preferred_dtype=self.dtype when converting Distribution methods'...

Specify a preferred_dtype=self.dtype when converting Distribution methods' sample-like args to Tensors.

After this change, you could conceivably write tfd.Normal(0., 1.).log_prob(1)

The tf core distributions can't use tfp dtype_util.common_dtype, so you can't yet write tfd.Normal(0, 1).

Works around an eager bug that loses precision in the presence in tf.convert_to_tensor(0.5, preferred_dtype=tf.int32)

PiperOrigin-RevId: 214666222
parent ce585634
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment