User Tools

Site Tools


wiki:reg_neuronetwork

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
wiki:reg_neuronetwork [2019/06/06 07:56]
antonio
wiki:reg_neuronetwork [2019/06/06 08:14] (current)
antonio
Line 123: Line 123:
 normed_train_data = train_dataset #​norm(train_dataset) normed_train_data = train_dataset #​norm(train_dataset)
 normed_test_data = test_dataset #​norm(test_dataset) normed_test_data = test_dataset #​norm(test_dataset)
- 
-#Train the model for 1000 epochs 
-# Display training progress by printing a single dot for each completed epoch 
-#class PrintDot(keras.callbacks.Callback):​ 
-#  def on_epoch_end(self,​ epoch, logs): 
-#    if epoch % 100 == 0: print(''​) 
-#    print('​.',​ end=''​) 
  
 # Build the model. '​Sequential'​ model with two densely connected hidden layers,and an output layer that returns a single, continuous value # Build the model. '​Sequential'​ model with two densely connected hidden layers,and an output layer that returns a single, continuous value
Line 172: Line 165:
   validation_split=0.1,​   validation_split=0.1,​
   shuffle=True,​ verbose=2,   shuffle=True,​ verbose=2,
-  callbacks=[early_stop])#, PrintDot()])+  callbacks=[early_stop])
  
 #Plot the progress of the training #Plot the progress of the training
Line 402: Line 395:
 normed_train_data = train_dataset #​norm(train_dataset) normed_train_data = train_dataset #​norm(train_dataset)
 normed_test_data = test_dataset #​norm(test_dataset) normed_test_data = test_dataset #​norm(test_dataset)
- 
-#Train the model for 1000 epochs 
-# Display training progress by printing a single dot for each completed epoch 
-class PrintDot(keras.callbacks.Callback):​ 
-  def on_epoch_end(self,​ epoch, logs): 
-    if epoch % 100 == 0: print(''​) 
-    print('​.',​ end=''​) 
  
 # Build the model. '​Sequential'​ model with two densely connected hidden layers, and an output layer that returns a single, continuous value # Build the model. '​Sequential'​ model with two densely connected hidden layers, and an output layer that returns a single, continuous value
Line 444: Line 430:
   validation_split=0.1,​   validation_split=0.1,​
   shuffle=True,​ verbose=2,   shuffle=True,​ verbose=2,
-  callbacks=[early_stop, PrintDot()])+  callbacks=[early_stop])
  
 #Plot the progress of the training #Plot the progress of the training
Line 693: Line 679:
 normed_train_data = train_dataset #​norm(train_dataset) normed_train_data = train_dataset #​norm(train_dataset)
 normed_test_data = test_dataset #​norm(test_dataset) normed_test_data = test_dataset #​norm(test_dataset)
- 
-#Train the model for 1000 epochs 
-# Display training progress by printing a single dot for each completed epoch 
-class PrintDot(keras.callbacks.Callback):​ 
-  def on_epoch_end(self,​ epoch, logs): 
-    if epoch % 100 == 0: print(''​) 
-    print('​.',​ end=''​) 
  
 # Build the model. '​Sequential'​ model with two densely connected hidden layers,and an output layer that returns a single, continous value # Build the model. '​Sequential'​ model with two densely connected hidden layers,and an output layer that returns a single, continous value
Line 756: Line 735:
   validation_split=0.2,​   validation_split=0.2,​
   shuffle=True,​ verbose=2,   shuffle=True,​ verbose=2,
-  callbacks=[early_stop, PrintDot()]) #, checkpoint])+  callbacks=[early_stop]) #, checkpoint])
  
 #Plot the progress of the training #Plot the progress of the training
wiki/reg_neuronetwork.txt ยท Last modified: 2019/06/06 08:14 by antonio