LoginSignup
0
4

More than 5 years have passed since last update.

Keras2.0の紹介

Last updated at Posted at 2017-04-15

Keras2.0の紹介

  1. Kerasについて
  2. Keras2.0について(Keras2.0の概要)
  3. Keras2.0について(バックエンドについて)
  4. インストール方法
  5. TensorFlowへの簡易インタフェースとしてのKeras

Kerasについて

KerasはTensorFlowまたはTheanoをバックエンドとして動作する深層学習ライブラリです。
Pythonで実装されています。
Kerasは、迅速な実験を可能にすることに重点を置いて開発されました。

Keras2.0について(Keras2.0の概要)

2017年3月にKeras2.0がリリースされました。これにあたりアップデート関連で気になることについてまとめています。
1. KerasではAPIの変更がある場合、そのリリースを1つのリリースにまとめているため、ユーザーはコードの更新をまとめることができる
2. Keras 1とKeras 2の間のAPIの変更は可能な限り下位互換性がある。(複雑な場合を除いて、Keras 2でKeras 1のコードを実行可能。)
3. Keras 2はKerasの最初の「長期サポート」API。Keras 2で書かれたコードは、これからも数年間、最新のソフトウェアで動作するはず。

Keras2.0について(バックエンドについて)

  1. Keras 2 APIはTensorFlowリポジトリの一部となり、TensorFlowの高水準APIとして機能する。
  2. Theanoのサポートは無限に続く
  3. 将来的に多くのバックエンドをサポートする予定(MicrosoftはKerasのCNTKバックエンドを構築しています)

インストール方法

$ pip install keras

TensorFlowへの簡易インタフェースとしてのKeras

以下のようにも使える。

import tensorflow as tf
sess = tf.Session()

from keras import backend as K
K.set_session(sess)

# Keras layers can be called on TensorFlow tensors:
x = Dense(128, activation='relu')(img) # fully-connected layer with 128 units and ReLU activation
x = Dense(128, activation='relu')(x)
preds = Dense(10, activation='softmax')(x) # output layer with 10 units and a softmax activation

https://blog.keras.io/keras-as-a-simplified-interface-to-tensorflow-tutorial.html
より抜粋

参考資料

Spring 2017 roadmap: Keras 2, PR freeze, TF integration
Introducing Keras 2

類似資料

以下のアップデート版です。
Keras 2.0の概要
http://qiita.com/taki_tflare/items/49740a9d8f36464947b9

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