lmoroney / dlaicourse

Notebooks for learning deep learning
5.66k stars 5.36k forks source link

Fix for Exercise 7 'train_dir' is not defined issue, fixs for Issue of #22 and #27 #26

Closed JonathanSum closed 5 years ago

JonathanSum commented 5 years ago

Anyways, thank you for this course and the free exercises. I have learned a lot. Thank You

These two codes from below cannot be compiled because train_dir and validation_dir were declared after the following statements.

train_horses_dir = os.path.join(train_dir, 'horses') # Directory with our training horse pictures train_humans_dir = os.path.join(train_dir, 'humans') # Directory with our training humans pictures

As a result, train_horses_dir and train_humans_dir cannot run because train_dir and validation are not defined.

However, train_horses_dir and train_humans_dir are below train_horses_dir and train_humans_dir. train_dir = '/tmp/training'
validation_dir = '/tmp/validation'

JonathanSum commented 5 years ago

The exercise 7 Question file also has the same issue, and I fixed. I also finished the exercise 7 Question from the beginning to the end. There are no other errors. Thank you for your hard work.

JonathanSum commented 5 years ago

Updated: The last two pull requests are for fixing these two errors:

Fixing the Error for these two problems:

First Problem: Course 2 - Part 4 - Lesson 2 - Notebook #22

Second Problem: possible an error in the Exercise 5 answer https://www.coursera.org/learn/convolutional-neural-networks-tensorflow/discussions/weeks/1/threads/qc6UgmNCEemspw46kN80NA https://github.com/lmoroney/dlaicourse/issues/27