2017-05-01から1ヶ月間の記事一覧

scikit-imageを使った画像の平行移動

scikit-imageという便利なライブラリーを見つけた。 画像の平行移動が2行で実装できたので、以下に示す。 import skimage as ski from skimage import io from skimage.transform import rescale def test(self): # Lennaさんの画像を読み込み img_raw = ski…

損失関数がNaNになる問題

TensorFlowでDeep Learningを実行している途中で、損失関数がNaNになる問題が発生した。 Epoch: 10, Train Loss: 85.6908, Train Accuracy: 0.996, Test Error: 90.7068, Test Accuracy: 0.985238 Epoch: 20, Train Loss: 42.9642, Train Accuracy: 0.998286…

ResourceExhaustedErrorの原因

TensorFlowで学習していると、訓練データ数が大きい場合、たまにResourceExhaustedErrorが出る。 Windows 10では、以下の内容が表示される。 ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[37800,32,28,28] [[N…