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
ba98bc47
Commit
ba98bc47
authored
Dec 21, 2016
by
Mostafa Rahmani
Committed by
GitHub
Dec 21, 2016
Browse files
Update ptb_word_lm.py
bug fix for contrib.deprecated eliminatation in tf version 12.
parent
edd4ba11
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tutorials/rnn/ptb/ptb_word_lm.py
tutorials/rnn/ptb/ptb_word_lm.py
+3
-3
No files found.
tutorials/rnn/ptb/ptb_word_lm.py
View file @
ba98bc47
...
...
@@ -331,14 +331,14 @@ def main(_):
train_input
=
PTBInput
(
config
=
config
,
data
=
train_data
,
name
=
"TrainInput"
)
with
tf
.
variable_scope
(
"Model"
,
reuse
=
None
,
initializer
=
initializer
):
m
=
PTBModel
(
is_training
=
True
,
config
=
config
,
input_
=
train_input
)
tf
.
contrib
.
deprecated
.
scalar_summary
(
"Training Loss"
,
m
.
cost
)
tf
.
contrib
.
deprecated
.
scalar_summary
(
"Learning Rate"
,
m
.
lr
)
tf
.
scalar_summary
(
"Training Loss"
,
m
.
cost
)
tf
.
scalar_summary
(
"Learning Rate"
,
m
.
lr
)
with
tf
.
name_scope
(
"Valid"
):
valid_input
=
PTBInput
(
config
=
config
,
data
=
valid_data
,
name
=
"ValidInput"
)
with
tf
.
variable_scope
(
"Model"
,
reuse
=
True
,
initializer
=
initializer
):
mvalid
=
PTBModel
(
is_training
=
False
,
config
=
config
,
input_
=
valid_input
)
tf
.
contrib
.
deprecated
.
scalar_summary
(
"Validation Loss"
,
mvalid
.
cost
)
tf
.
scalar_summary
(
"Validation Loss"
,
mvalid
.
cost
)
with
tf
.
name_scope
(
"Test"
):
test_input
=
PTBInput
(
config
=
eval_config
,
data
=
test_data
,
name
=
"TestInput"
)
...
...
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