Commit c12f0c5f authored by Asim Shankar's avatar Asim Shankar Committed by TensorFlower Gardener
Browse files

eager/examples: Use tf.keras.Model in RNN examples.

Some notable differences between tf.keras.Model and tfe.Network:

- tf.keras.Model doesn't have a track_layer() method. It tracks Layer and Checkpointable valued attributes automatically. For list and other complex structures, __setattr__ performs the role of tfe.Network.track_layer()

- tf.keras.Model accepts a single positional argument. Thus either all arguments must be packaged into a single list/tuple (as in rnn_ptb.py) or be provided as keyword arguments (as in rnn_colorbot.py).

PiperOrigin-RevId: 187682716
parent 737d2e73
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment