Skip to content

Commit 92bc059

Browse files
authored
Merge pull request oreilly-japan#10 from hnakamur/use_os_pardir
Use os.pardir when modifying sys.path
2 parents 751d55d + bebc451 commit 92bc059

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ch05/train_neuralnet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding: utf-8
22
import sys, os
3-
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
3+
sys.path.append(os.pardir)
44

55
import numpy as np
66
from dataset.mnist import load_mnist
@@ -43,4 +43,4 @@
4343
test_acc = network.accuracy(x_test, t_test)
4444
train_acc_list.append(train_acc)
4545
test_acc_list.append(test_acc)
46-
print(train_acc, test_acc)
46+
print(train_acc, test_acc)

0 commit comments

Comments
 (0)