Skip to content

Commit

Permalink
fix relative import for helper.py funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed Jun 8, 2019
1 parent c8702ff commit 9ed2f28
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 6 deletions.
3 changes: 3 additions & 0 deletions pytorch_ipynb/mechanics/custom-data-loader-quickdraw.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@
"metadata": {},
"outputs": [],
"source": [
"# load utilities from ../helper.py\n",
"import sys\n",
"sys.path.insert(0, '..') \n",
"from helper import quickdraw_npy_to_imagefile\n",
"\n",
" \n",
Expand Down
18 changes: 12 additions & 6 deletions tensorflow1_ipynb/cnn/cnn-vgg16.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,18 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Found existing cifar-10-python.tar.gz (162.6 Mb)\n",
"Extracting cifar-10-python.tar.gz ...\n"
"ename": "TypeError",
"evalue": "insert() takes exactly 2 arguments (1 given)",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-1-0beb05071f51>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0msys\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 7\u001b[0;31m \u001b[0msys\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minsert\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'..'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 8\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mhelper\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mdownload_and_extract_cifar\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mTypeError\u001b[0m: insert() takes exactly 2 arguments (1 given)"
]
}
],
Expand All @@ -71,6 +74,9 @@
"### DATASET\n",
"##########################\n",
"\n",
"# load utilities from ../helper.py\n",
"import sys\n",
"sys.path.insert(0, '..') \n",
"from helper import download_and_extract_cifar\n",
"from helper import Cifar10Loader\n",
"\n",
Expand Down
4 changes: 4 additions & 0 deletions tensorflow1_ipynb/mechanics/dataset-api.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
"# on your machine.\n",
"\n",
"import numpy as np\n",
"\n",
"# load utilities from ../helper.py\n",
"import sys\n",
"sys.path.insert(0, '..') \n",
"from helper import mnist_export_to_jpg\n",
"\n",
"np.random.seed(123)\n",
Expand Down
4 changes: 4 additions & 0 deletions tensorflow1_ipynb/mechanics/file-queues.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
"# on your machine.\n",
"\n",
"import numpy as np\n",
"\n",
"# load utilities from ../helper.py\n",
"import sys\n",
"sys.path.insert(0, '..') \n",
"from helper import mnist_export_to_jpg\n",
"\n",
"np.random.seed(123)\n",
Expand Down
4 changes: 4 additions & 0 deletions tensorflow1_ipynb/mechanics/image-data-chunking-hdf5.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
"# on your machine.\n",
"\n",
"import numpy as np\n",
"\n",
"# load utilities from ../helper.py\n",
"import sys\n",
"sys.path.insert(0, '..') \n",
"from helper import mnist_export_to_jpg\n",
"\n",
"np.random.seed(123)\n",
Expand Down
4 changes: 4 additions & 0 deletions tensorflow1_ipynb/mechanics/image-data-chunking-npz.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@
"# on your machine.\n",
"\n",
"import numpy as np\n",
"\n",
"# load utilities from ../helper.py\n",
"import sys\n",
"sys.path.insert(0, '..') \n",
"from helper import mnist_export_to_jpg\n",
"\n",
"np.random.seed(123)\n",
Expand Down
4 changes: 4 additions & 0 deletions tensorflow1_ipynb/mechanics/tfrecords.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
"# on your machine.\n",
"\n",
"import numpy as np\n",
"\n",
"# load utilities from ../helper.py\n",
"import sys\n",
"sys.path.insert(0, '..') \n",
"from helper import mnist_export_to_jpg\n",
"\n",
"np.random.seed(123)\n",
Expand Down

0 comments on commit 9ed2f28

Please sign in to comment.