Closed CupOfGeo closed 3 years ago
def on_epoch_end(self, epoch, logs={}): if(logs.get('loss')<0.4): print("\nReached 60% accuracy so cancelling training!") self.model.stop_training = True
Im new but shouldn't it be accuracy? something like this?
def on_epoch_end(self, epoch, logs={}): if(logs.get('accuracy') > 0.85): print("\nReached 85% accuracy so cancelling training!") self.model.stop_training = True
with the metrics added to the compile line model.compile(optimizer='adam',loss='sparse_categorical_crossentropy',metrics=['accuracy'])
edit lol just watched the next video shouldn't it just say print("\nReached loss < 0.4 so cancelling training!")
def on_epoch_end(self, epoch, logs={}): if(logs.get('loss')<0.4): print("\nReached 60% accuracy so cancelling training!") self.model.stop_training = True
Im new but shouldn't it be accuracy? something like this?
def on_epoch_end(self, epoch, logs={}): if(logs.get('accuracy') > 0.85): print("\nReached 85% accuracy so cancelling training!") self.model.stop_training = True
with the metrics added to the compile line model.compile(optimizer='adam',loss='sparse_categorical_crossentropy',metrics=['accuracy'])
edit lol just watched the next video shouldn't it just say print("\nReached loss < 0.4 so cancelling training!")