Skip to content

Instantly share code, notes, and snippets.

@adash333
Created July 22, 2017 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adash333/decacc131ec55b09d8cef6c3105c9460 to your computer and use it in GitHub Desktop.
Save adash333/decacc131ec55b09d8cef6c3105c9460 to your computer and use it in GitHub Desktop.
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, Activation
from keras.optimizers import SGD
from keras.models import model_from_json
# モデルを読み込む
model = model_from_json(open('my_model34.json').read())
# 学習結果を読み込む
model.load_weights('my_model34.hdf5')
model.summary();
X = np.array([[0, 0], [0, 1], [1, 0], [1, 1]])
prediction = model.predict(X)
print(prediction[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment