From d287281632580946cf34144ec291d37bc8874af2 Mon Sep 17 00:00:00 2001 From: jiangjiajun Date: Fri, 12 Jul 2019 10:41:52 +0800 Subject: [PATCH] modify download demo for python3 --- tensorflow2fluid/vgg_translate_tutorial.ipynb | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tensorflow2fluid/vgg_translate_tutorial.ipynb b/tensorflow2fluid/vgg_translate_tutorial.ipynb index b6e4c3d..14c5ef6 100644 --- a/tensorflow2fluid/vgg_translate_tutorial.ipynb +++ b/tensorflow2fluid/vgg_translate_tutorial.ipynb @@ -16,10 +16,14 @@ "metadata": {}, "outputs": [ { - "name": "stderr", - "output_type": "stream", - "text": [ - "Download percentage 100.00%" + "ename": "AttributeError", + "evalue": "module 'urllib' has no attribute 'urlretrieve'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0murl\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 10\u001b[0;31m \u001b[0mfetch\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0murllib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0murlretrieve\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0murl\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"./vgg_16.tar.gz\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mschedule\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m: module 'urllib' has no attribute 'urlretrieve'" ] } ], @@ -341,21 +345,21 @@ ], "metadata": { "kernelspec": { - "display_name": "Python [conda env:GPU-Paddle]", + "display_name": "tensorflow", "language": "python", - "name": "conda-env-GPU-Paddle-py" + "name": "tensorflow" }, "language_info": { "codemirror_mode": { "name": "ipython", - "version": 2 + "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.15" + "pygments_lexer": "ipython3", + "version": "3.5.6" }, "varInspector": { "cols": { -- GitLab