Skip to content

Commit

Permalink
Cast uploaded.keys() to list before indexing
Browse files Browse the repository at this point in the history
In examples/colab/tf_hub_generative_image_module.ipynb
as of python 3 keys() method of dictionary returns a view(DictKeys) object and doesn't support indexing
  • Loading branch information
RaghavaDhanya committed May 16, 2018
1 parent 648c41e commit cc6cacc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/colab/tf_hub_generative_image_module.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
"\n",
"def upload_image():\n",
" uploaded = files.upload()\n",
" image = imageio.imread(uploaded[uploaded.keys()[0]])\n",
" image = imageio.imread(uploaded[list(uploaded.keys())[0]])\n",
" return transform.resize(image, [128, 128])\n",
"\n",
"if image_from_module_space:\n",
Expand Down

0 comments on commit cc6cacc

Please sign in to comment.