We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c475870 commit 8a9a83dCopy full SHA for 8a9a83d
code/logistic_sgd.py
@@ -159,8 +159,12 @@ def load_data(dataset):
159
data_dir, data_file = os.path.split(dataset)
160
if data_dir == "" and not os.path.isfile(dataset):
161
# Check if dataset is in the data directory.
162
- new_path = os.path.join(os.path.split(os.path.split(__file__)[0])[0],
163
- "data", dataset)
+ new_path = os.path.split(__file__)
+ if new_path[0] == "":
164
+ new_path = os.path.join('..', "data", dataset)
165
+ else:
166
+ new_path = os.path.join(os.path.split(os.path.split(__file__)[0])[0],
167
+ "data", dataset)
168
if os.path.isfile(new_path) or data_file == 'mnist.pkl.gz':
169
dataset = new_path
170
0 commit comments