Commit 6d6ab9ca authored by George Karpenkov's avatar George Karpenkov Committed by A. Unique TensorFlower
Browse files

Remove dead code from shakespeare_main model

PiperOrigin-RevId: 272077584
parent ddee474e
...@@ -138,14 +138,7 @@ def build_model(vocab_size, ...@@ -138,14 +138,7 @@ def build_model(vocab_size,
Returns: Returns:
A Keras Model. A Keras Model.
""" """
# In V1 there is a separate class for CuDNN. In V2 the LSTM class will use assert keras_utils.is_v2_0()
# CuDNN automatically if applicable.
if use_cudnn and not keras_utils.is_v2_0():
LSTM = tf.compat.v1.CuDNNLSTM
else:
# The LSTM call was rewritten to be more efficient in 2.0. However because
# we want to compare the performance of the two runtimes, we force both
# V1 and V2 to use the more efficient implementation.
LSTM = functools.partial(tf.keras.layers.LSTM, implementation=2) LSTM = functools.partial(tf.keras.layers.LSTM, implementation=2)
# By indirecting the activation through a lambda layer, the logic to dispatch # By indirecting the activation through a lambda layer, the logic to dispatch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment