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
2e5cbaac
Commit
2e5cbaac
authored
Mar 15, 2018
by
Christopher Shallue
Browse files
Wrap dict.keys() and dict.values() in list() for Python3 compatibility.
parent
b5574d2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
research/astronet/astronet/ops/dataset_ops.py
research/astronet/astronet/ops/dataset_ops.py
+2
-2
No files found.
research/astronet/astronet/ops/dataset_ops.py
View file @
2e5cbaac
...
@@ -185,8 +185,8 @@ def build_dataset(file_pattern,
...
@@ -185,8 +185,8 @@ def build_dataset(file_pattern,
# Create a HashTable mapping label strings to integer ids.
# Create a HashTable mapping label strings to integer ids.
table_initializer
=
tf
.
contrib
.
lookup
.
KeyValueTensorInitializer
(
table_initializer
=
tf
.
contrib
.
lookup
.
KeyValueTensorInitializer
(
keys
=
input_config
.
label_map
.
keys
(),
keys
=
list
(
input_config
.
label_map
.
keys
()
)
,
values
=
input_config
.
label_map
.
values
(),
values
=
list
(
input_config
.
label_map
.
values
()
)
,
key_dtype
=
tf
.
string
,
key_dtype
=
tf
.
string
,
value_dtype
=
tf
.
int32
)
value_dtype
=
tf
.
int32
)
label_to_id
=
tf
.
contrib
.
lookup
.
HashTable
(
label_to_id
=
tf
.
contrib
.
lookup
.
HashTable
(
...
...
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