Guest User

Untitled

a guest
Apr 26th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. x_train = np.array([cv2.imread("1small.jpg")])
  2. y_train = np.array([14.1, 13.5, 16.3, 14.1])
  3.  
  4. x_test = np.array([cv2.imread("0small.jpg")])
  5. y_test = np.array([11.8, 10.8, 17.0, 16.0]) # fake data just to test
  6.  
  7. model = Sequential()
  8. model.add(Dense(1,32,32,3))
  9. model.add(Activation('tanh'))
  10. model.add(Dense(1))
  11. model.compile(loss='mean_absolute_error', optimizer='rmsprop')
  12.  
  13. model.fit(x_train, y_train, nb_epoch=1, batch_size=1)
  14.  
  15. prediction = model.predict(x_test)
  16. print prediction
Add Comment
Please, Sign In to add comment