今回はニューラルネットワークのフレームワークの Keras を使って AutoEncoder を書いてみる。 AutoEncoder は入力になるべく近い出力をするように学習したネットワークをいう。 AutoEncoder は特徴量の次元圧縮や異常検知など、幅広い用途に用いられている。 使った環境は次の通り。 $ sw_vers ProductName: Mac OS X ProductVersion: 10.14.6 BuildVersion: 18G95 $ python -V Python 3.7.4 下準備 まずは必要なパッケージをインストールしておく。 $ pip install keras tensorflow matplotlib 中間層が一層の AutoEncoder Keras の Sequential API を使って実装した最も単純な AutoEncoder のサンプ
![Python: Keras で AutoEncoder を書いてみる - CUBE SUGAR CONTAINER](https://cdn-ak-scissors.b.st-hatena.com/image/square/d671be4eb0174575775bbb9da3ba7b6c8228b65f/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fm%2Fmomijiame%2F20190908%2F20190908213044.png)