deep-learning-from-scratch
deep-learning-from-scratch copied to clipboard
『ゼロから作る Deep Learning』(O'Reilly Japan, 2016)
無料の JupyterLab 環境である [Amazon SageMaker Studio Lab](https://studiolab.sagemaker.aws/) への対応を追加しました。 以下が変更点です: Chapter01のスクリプトをノートブック化して、notebooksのフォルダに追加(Chapter01の動作が問題なければ他章もノートブック化してからプルリク予定)、 README.md への "Open Studio Lab" ボタン追加、 README.md へのリンク追加、 Studio Lab 自体の説明のため README_studio-lab.md の追加。
使用していないため特に影響はないのですが、接線を求める関数が二次元に対応していなかったので修正しました。
誤字
一応メールで送信しましたが、2週間経っても返信がないようなのでここに書きます。 232ページの8行目、`self.last_layer = SoftmaxWithLoss()`とありますが、そのページの解説や他のコードには、`lastLayer`と表記されています。他の変数がスネークケースで書かれていること、[github](https://github.com/oreilly-japan/deep-learning-from-scratch/blob/f549a1886b4c03a252ac7549311e29c1ed78a8a1/ch07/simple_convnet.py#L59)のコードには全て`last_layer`と表記されていることから、`last_layer`が正しいと思われます。
p.189 6.3.2 節(第12刷) ch06/batch_norm_test.py を実行させると 図6-18 が出てくるように読めるのですが、 実際には図6-19が現れます。
in deep_convnet.py `pre_node_nums = np.array([1*3*3, 16*3*3, 16*3*3, 32*3*3, 32*3*3, 64*3*3, 64*4*4, hidden_size])` how to compute the neurons number in each convolution layer? why not `pre_node_nums = np.array([1*3*3, 16, 16, 32,...
if you just change the suffix of the picture ,you will get this error in the command > ValueError: invalid PNG header you should change the picture through the professional...
Here is the test code: ```python import numpy as np def numerical_gradient(f, x): h = 1e-4 # 0.0001 grad = np.zeros_like(x) it = np.nditer(x, flags=['multi_index'], op_flags=['readwrite']) while not it.finished: idx...
初版 3章P.76にてpickleを使う1節がありますが、 事前に```import pickle```と記述してライブラリをインストールしておく必要があるようです。 テキストにその記載がないように思われるので、念の為投稿します! P.74 - 77をまとめて記述すると以下のようになるかと思います。 (P.75の画像表示のくだりを除く) ``` import os, sys sys.path.append(os.pardir) import numpy as np from dataset.mnist import load_mnist from PIL import Image import pickle #ここを新しく記述! def...
https://github.com/oreilly-japan/deep-learning-from-scratch/blob/77eba24406354f1361fe3614fdcac54844729184/common/util.py#L71-L99 上記コードでimgの初期化部分 `img = np.zeros((N, C, H + 2*pad + stride - 1, W + 2*pad + stride - 1)) ` について、stride>1のときに余分なゼロ要素を生成している気がします。 return時のスライスにて消去されるので結果には影響ないかと思いますが、 余分なメモリ使用やコード理解の妨げになるのではと思い投稿させていただきました。  改善案として、img初期化時の配列サイズは下記でよいかと思うのですがいかがでしょうか。 `img = np.zeros((N, C,...