
184
8
章 オートエンコーダハンズオン
1
層の
27
ノードの隠れ層を、
28
ノードと
27
ノードの
2
つの隠れ層に置き換える。先程のネットワーク
に対して少し変更するだけだ。これでこのニューラルネットワークは、隠れ層が
2
層プラス出力層
1
層
で
3
層になる。入力層は層数には数えないことに注意しよう。
隠れ層を追加するには、次のように
1
行追加するだけだ。
# Model two
# Three layer undercomplete autoencoder with linear activation
# With 28 and 27 nodes in the two hidden layers, respectively
model = Sequential()
model.add(Dense(units=28, activation='linear',input_dim=29))
model.add(Dense(units=27, activation='linear'))
model.add(Dense(units=29, activation='linear'))
10
回実行した場合の結果の分布を下に示す。平均適合率の平均は
0.36
で、先程の
0.53
よりも悪く
なってしまった。平均適合率のばらつきも悪化し、変動係数は
0.94
となっている(大きい値のほうが悪
い )。
Mean average precision over 10 runs: 0.36075271075596366
Coefficient of variation ...