Makes MaybeCastToFPropDtype() work for dtypes such as tf.float32_ref.
Makes MaybeCastToFPropDtype() work for dtypes such as tf.float32_ref.

PiperOrigin-RevId: 340771592

tensorflow/lingvo,tensorflow/lingvo,tensorflow/lingvo,tensorflow/lingvo