Use tf.dimension_value to avoid the case where `Dimension(None)` is coerced to True.
Use tf.dimension_value to avoid the case where `Dimension(None)` is coerced to True.

PiperOrigin-RevId: 233415527
Change-Id: Iec46ebdf8a7a24c6636e2e6a8a2a7f6eb7707239

tensorflow/agents,tensorflow/agents