Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Course 1 - Part 4 - Lesson 2 - Notebook.ipynb Exercise 8 #168

Closed
CupOfGeo opened this issue Mar 17, 2021 · 0 comments
Closed

Course 1 - Part 4 - Lesson 2 - Notebook.ipynb Exercise 8 #168

CupOfGeo opened this issue Mar 17, 2021 · 0 comments

Comments

@CupOfGeo
Copy link

CupOfGeo commented Mar 17, 2021

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!")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant