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
edd4ba11
Commit
edd4ba11
authored
Dec 21, 2016
by
Mostafa Rahmani
Committed by
GitHub
Dec 21, 2016
Browse files
Update word2vec.py
bug fix for contrib.deprecated eliminatation in tf version 12.
parent
75d3de64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tutorials/embedding/word2vec.py
tutorials/embedding/word2vec.py
+1
-1
No files found.
tutorials/embedding/word2vec.py
View file @
edd4ba11
...
@@ -365,7 +365,7 @@ class Word2Vec(object):
...
@@ -365,7 +365,7 @@ class Word2Vec(object):
self
.
_word2id
[
w
]
=
i
self
.
_word2id
[
w
]
=
i
true_logits
,
sampled_logits
=
self
.
forward
(
examples
,
labels
)
true_logits
,
sampled_logits
=
self
.
forward
(
examples
,
labels
)
loss
=
self
.
nce_loss
(
true_logits
,
sampled_logits
)
loss
=
self
.
nce_loss
(
true_logits
,
sampled_logits
)
tf
.
contrib
.
deprecated
.
scalar_summary
(
"NCE loss"
,
loss
)
tf
.
scalar_summary
(
"NCE loss"
,
loss
)
self
.
_loss
=
loss
self
.
_loss
=
loss
self
.
optimize
(
loss
)
self
.
optimize
(
loss
)
...
...
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