Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #191 from tqchen/master
Browse files Browse the repository at this point in the history
[EXAMPLE] make example run on any folder
  • Loading branch information
tqchen committed Sep 30, 2015
2 parents 8b9e1c6 + 2df2ce7 commit 6155880
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions example/cifar10/cifar10.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# pylint: skip-file
import sys, os
import mxnet as mx
sys.path.append("../../tests/python/common")
# code to automatically download dataset
curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
sys.path.append(os.path.join(curr_path, "../../tests/python/common"))
import get_data
import mxnet as mx
import numpy as np
import logging

logger = logging.getLogger()
logger.setLevel(logging.DEBUG)

Expand Down
6 changes: 4 additions & 2 deletions example/mnist/data.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# pylint: skip-file
""" data iterator for mnist """
import sys
sys.path.insert(0, "../../python/")
sys.path.append("../../tests/python/common")
import os
# code to automatically download dataset
curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
sys.path.append(os.path.join(curr_path, "../../tests/python/common"))
import get_data
import mxnet as mx

Expand Down

0 comments on commit 6155880

Please sign in to comment.