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
eb784c09
Commit
eb784c09
authored
Oct 11, 2018
by
Brendan Apfeld
Browse files
Prevents TypeError:'dict_keys' object does not support indexing
parent
e2fb51d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
research/skip_thoughts/skip_thoughts/data/preprocess_dataset.py
...ch/skip_thoughts/skip_thoughts/data/preprocess_dataset.py
+2
-2
No files found.
research/skip_thoughts/skip_thoughts/data/preprocess_dataset.py
View file @
eb784c09
...
...
@@ -121,8 +121,8 @@ def _build_vocabulary(input_files):
tf
.
logging
.
info
(
"Processed %d sentences total"
,
num
)
words
=
wordcount
.
keys
(
)
freqs
=
wordcount
.
values
()
words
=
list
(
wordcount
)
freqs
=
list
(
wordcount
.
values
()
)
sorted_indices
=
np
.
argsort
(
freqs
)[::
-
1
]
vocab
=
collections
.
OrderedDict
()
...
...
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