SHARE
TWEET

Untitled

a guest Jun 26th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. test_y = np.reshape(test_y, (-1, 3))
  2.      
  3. for i in range(EPOCHS):
  4.     for i in range(1,hm_data+1):
  5.         train_data = np.load('training_data.npy')
  6.  
  7.         train = train_data[:-100]
  8.         test = train_data[-100:]
  9.  
  10.         X = np.array([i[0] for i in train]).reshape(-1,WIDTH,HEIGHT,1)
  11.         Y = [i[1] for i in train]
  12.         Y = np.reshape(Y, (-1, 3))
  13.         print("Shape: ", X.shape)
  14.         print(np.shape(Y))
  15.  
  16.         test_x = np.array([i[0] for i in test]).reshape(-1,WIDTH,HEIGHT,1)
  17.         test_y = [i[1] for i in test]
  18.  
  19.         model.fit({'input': X}, {'targets': Y}, n_epoch=1, validation_set=({'input': test_x}, {'targets': test_y}),
  20.             snapshot_step=500, show_metric=True, run_id=MODEL_NAME)
  21.  
  22.         model.save(MODEL_NAME)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top