LoginSignup
4
2

More than 5 years have passed since last update.

ゼロから始めるDeep Learning ―通勤時間にスマホの Google Colab で学ぶ :01

Last updated at Posted at 2018-06-27

はじめに

今更ながら ゼロから作るDeep Learning ――Pythonで学ぶディープラーニングの理論と実装 を通勤時間に読み始めたので、ついでにQiitaへの投稿も初めてみる

簡単に自己紹介

しがない社内SE、Jupyter Notebook や、Google Colab を、サラッと試した事があり、Deep Learning、機械学習についてもサラッと調べてる程度

通勤環境

-都内3路線乗り継ぎでドア2ドア1時間
-スマホはiPhone 6S Plus

当初の目論見

『使うライブラリは、NumPy と Matplotlib ね、それなら Google Colab 使って、通勤時間にハンズオンできるじゃね』

とりあえず、1章

Matplotlib での、グラフ描画も問題なさそう。
ch01-1.png

が、問題発生

1.6.3 画像の表示

そもそも読み込む画像がないので deep-learning-from-scratch からソースコードを持ってくる。
!コマンドでシェルコマンドを実行できるので、

!git clone https://github.com/oreilly-japan/deep-learning-from-scratch ./hoge #適当なフォルダ

フルパスで指定して読み込み

!pwd #/content

import matplotlib.pyplot as plt
from matplotlib.image import imread

!ls ~/ #datalab  hoge
#img = imread('~/hoge/dataset/lena.png') # FileNotFoundError: [Errno 2] No such file or directory: '~/hoge/dataset/lena.png'
img = imread('/content/hoge/dataset/lena.png') # 画像の読み込み
plt.imshow(img)

plt.show()

ch01-2.png

今回はここまで

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2