Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

kaggle tutorial computer vision part 4

Posted at

の解説です。前partでフィルターについての解説を見ましたが、このpartではそのフィルタをどのように画像に適用していくのかの説明を行っています。

LueNK6b.gif

tutorial にでてくるこのgifが視覚的な説明となります。

from tensorflow import keras
from tensorflow.keras import layers

model = keras.Sequential([
    layers.Conv2D(filters=64,
                  kernel_size=3,
                  strides=1,
                  padding='same',
                  activation='relu'),
    layers.MaxPool2D(pool_size=2,
                     strides=1,
                     padding='same')
    # More layers follow
])

layers.Conv2D(...): 2 次元畳み込み層を追加。
filters=64: フィルターの数を 64 に設定。フィルターは、入力データから特徴を抽出する役割を持ちます。ここでのフィルター数は、出力される特徴マップの数のことです。
kernel_size=3: フィルターのサイズを 3x3 に設定。一度に処理する入力データの領域のサイズ(3x3 ピクセル)のことです。
strides=1: ストライドを 1 に設定。ストライドは、フィルターを移動させる際のステップ数です。ここでは、フィルターを 1 ピクセルずつ移動させます。
activation='relu': 活性化関数を ReLU (Rectified Linear Unit) に設定。

その後出てくるコードは視覚的な支援のためのコードで実際的な意味はあまりありません。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?