Employ functor pattern to restore use of Keras in VAE example. END_PUBLIC Compare to cl/198735445.
Employ functor pattern to restore use of Keras in VAE example.
END_PUBLIC
Compare to cl/198735445.

Automated g4 rollback of changelist 198653570.

*** Reason for rollback ***

Establish a new pattern which enables using Keras.

*** Original change description ***

#BEGIN_PUBLIC
Fix VAE visualizations by reverting from Keras layers to tf.layers.

Since Keras layers don't respect TF variable scope, reusing a Keras model
requires passing around an object, which isn't feasible in the current
structure of this example.

(also fixes a small nit re:binarization terminology)
#

PiperOrigin-RevId: 198940737

tensorflow/probability,tensorflow/probability