前提・実現したいこと
ゼロから作るDeep Learning
――Pythonで学ぶディープラーニングの理論と実装を勉強中です。
第3章のMNISTのデータの読み込みを行いたいのですが、
下記のエラーが出てきてしまって読み込めなくて困っています・・・
発生している問題・エラーメッセージ
runfile('C:/Users/a/.spyder-py3/mnis.py', wdir='C:/Users/a/.spyder-py3') Traceback (most recent call last): File "C:\Users\a\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2910, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-4-efe10982afc6>", line 1, in <module> runfile('C:/Users/a/.spyder-py3/mnis.py', wdir='C:/Users/a/.spyder-py3') File "C:\Users\a\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile execfile(filename, namespace) File "C:\Users\a\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace) File "C:/Users/a/.spyder-py3/mnis.py", line 9 os.chdir(r'C:\Users\a.spyder-py3\ch03\dataset) ^ SyntaxError: EOL while scanning string literal
該当のソースコード
import sys,os os.chdir('/C:\Users\フォルダ名.spyder-py3\ch03\dataset') sys.path.append(os.pardir) from dataset.mnist import load_mnist (x_train,t_train),(x_test,t_test)=\ load_mnist(flatten=True,normalize=False) print(x_train.shape) print(t_train.shape) print(x_test.shape) print(t_test.shape)
試したこと
データの準備は行いました。
いろいろと検索してみましたが、よくわかりません。
mnist.pkl
t10k-images-idx3-ubyte.gz
t10k-labels-idx1-ubyte.gz
train-images-idx3-ubyte.gz
train-labels-idx1-ubyte.gz
補足情報(FW/ツールのバージョンなど)
Windws10
Python3.5
Spyder
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/03/16 12:42