Fix an issue of slicing into the event dimensions of ed.Independent.
Fix an issue of slicing into the event dimensions of ed.Independent.

TFP distribution slicing can only be used with batch dimensions, and not event
dimensions. Since our trainable initializers return ed.Independent random
variables with all batch dimensions reinterpreted as event dimensions, slicing
as is done below for `recurrent_kernel` will emit a warning from the C++ side
for a failure (which we catch on the Python side).  To avoid the warnings, we
override this function and call `.value` before slicing.

PiperOrigin-RevId: 301258712

google/edward2