Disable the trainable-variable check when the backward path is wrapped inside a tf.function, since variables are lifted out and tf.trainable_variables() will be empty.
Disable the trainable-variable check when the backward path is
wrapped inside a tf.function, since variables are lifted out and
tf.trainable_variables() will be empty.

PiperOrigin-RevId: 372146759

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