Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
6d6ab9ca
Commit
6d6ab9ca
authored
Sep 30, 2019
by
George Karpenkov
Committed by
A. Unique TensorFlower
Sep 30, 2019
Browse files
Remove dead code from shakespeare_main model
PiperOrigin-RevId: 272077584
parent
ddee474e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
official/staging/shakespeare/shakespeare_main.py
official/staging/shakespeare/shakespeare_main.py
+2
-9
No files found.
official/staging/shakespeare/shakespeare_main.py
View file @
6d6ab9ca
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment