Skip to content

Commit

Permalink
Use os.pardir when modifying sys.path
Browse files Browse the repository at this point in the history
  • Loading branch information
hnakamur committed Nov 23, 2016
1 parent 148983d commit bebc451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ch05/train_neuralnet.py
@@ -1,6 +1,6 @@
# coding: utf-8
import sys, os
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(os.pardir)

import numpy as np
from dataset.mnist import load_mnist
Expand Down Expand Up @@ -43,4 +43,4 @@
test_acc = network.accuracy(x_test, t_test)
train_acc_list.append(train_acc)
test_acc_list.append(test_acc)
print(train_acc, test_acc)
print(train_acc, test_acc)

0 comments on commit bebc451

Please sign in to comment.