kerasはtensorflow 1.1あたりからtensorflowに取り込まれた。

keras/examples/mnist_cnn.pyを動作させるさせるには以下の変更が必要(tensorflow 1.3.0にて確認)。変更前)
import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras import backend as K変更後)
import tensorflow.contrib.keras as keras
from tensorflow.contrib.keras.python.keras.datasets import mnist
from tensorflow.contrib.keras.python.keras.models import Sequential
from tensorflow.contrib.keras.python.keras.layers import Dense, Dropout, Flatten
from tensorflow.contrib.keras.python.keras.layers import Conv2D, MaxPooling2D
from tensorflow.contrib.keras.python.keras import backend as K
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.