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
018e62f0
Commit
018e62f0
authored
Oct 30, 2017
by
Ken Kawamoto
Committed by
Neal Wu
Oct 29, 2017
Browse files
Prevent analogy() from printing spurious "unknown" (#2584)
parent
57014e4c
Changes
1
Show 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 @
018e62f0
...
...
@@ -482,7 +482,7 @@ class Word2Vec(object):
for
c
in
[
self
.
_id2word
[
i
]
for
i
in
idx
[
0
,
:]]:
if
c
not
in
[
w0
,
w1
,
w2
]:
print
(
c
)
b
re
ak
re
turn
print
(
"unknown"
)
def
nearby
(
self
,
words
,
num
=
20
):
...
...
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