python
1import sys,os 2os.chdir("C:\Users\keigo\Documents\python\Deep Learning\dataset") 3sys.path.append(os.pardir) 4from dataset.mnist import load_mnist 5 6(x_train, t_train), (x_test, t_test) = \ 7load_mnist(flatten=True, normalize=False) 8 9print(x_train.shape) 10print(t_train.shape) 11print(x_test.shape) 12print(t_test.shape)
このようにしましたが、
"C:\Users\keigo\Documents\python\Deep Learning\venv\Scripts\python.exe" "C:\Users\keigo\Documents\python\Deep Learning\3.6.1.py"
File "C:\Users\keigo\Documents\python\Deep Learning\3.6.1.py", line 2
os.chdir("C:\Users\keigo\Documents\python\Deep Learning\dataset")
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
Process finished with exit code 1
というエラーが出ました。
なぜでしょうか。
os.chdir()でファイルのパスはとおしています
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/08/04 06:24
2018/08/04 11:24
2018/08/04 11:37
2018/08/04 11:56
2018/08/04 11:57
2018/08/04 12:00
2018/08/04 12:01