The code for chapter 4, exercise 4.1 loading the Cifar10 dataset. it should be updated and tensorflow is installed version 2.4.1 for cuda 11. I did not have to install it, but I tried to re-install to see if it made a difference it just said requirements already satisfied as I expected.
Cifar10 dataset and to_categorical:
import tensorflow as tf this is needed for the load function which
needs to be changed to:
and this needs tensorflow added.
from tensorflow.keras.utils import to_categorical,
currently its from keras.utils import to_categorical
The import of the
tfds is no longer needed. The
model.py also needs tensoflow added same with
predict.py unless that’s part of the exercise.
Unfortunately as I proceeded through the chapter I have found that nothing works without some modification. At one point
main.py sets the epochs, calls
the build model and controls everything. The in the second part with the upgraded
model defined with dropout and l2 the model.py is now setting the epochs running the training but then the history and plot are never used or called. Also the training won’t even start until you close the images from Cifar10 which pop up twice in the gui.
Someone really needs to take a look at the entire Machine learning course because there are errors ranging from the trivial to examples and solutions that simply don’t work. The math is good but the written explanations can be hard to follow. if I was able I would have been making the changes and updates myself so the next person who goes through the course has an easier time. I’m fortunate I have a solid background in AI and know what needs to be done to get things working. The course has a solid foundation and is interesting, it just needs some updating and a good proof reading.
Hello @hskramer ,
Many thanks for your feedback. I will review it this week and try to fix all these errors you mention.
I thought I would point out one other thing the imports require
tensorflow however if you import tensorflow like
import tensorflow as tf you can then build the model layers with
tf.keras.layers. I think this is what was probably intended. You just can’t import
keras.layers. without the tensorflow in front unless you do the
pip3 install keras which is not mentioned until you get to the very bottom which would require going past the solutions to the exercises that come before. So you could move that to the top or do something like this. I just depends on how you intend to introduce the build model exercise. It is more common to import tensorflow and then use
tf.keras.layers.Conv2D for example. If want to maintain consistency with tensorflow’s examples and tutorials. I was in a rush last night and should have put this in earlier. I also forgot to mention that most of the given paths for the exercise leave out the
dl_exercise where all the code for the units is placed. Since the clone of the repo in done is the
catkin_ws/src just as the
get_image_camera.py has the correct directory specified in the give path
src/dlrepo/get_images/src/get_image_camera.py which includes the
get_image subdirectory. If there is anything I can do to help let me know and I will do my best. Machine learning/deep learning is a very interesting and popular subject today.
I would like to apologies for some of my criticism of this course, much of it had to do with how the course was written and the language which was unfair. I’m a native English speaker so it’s easy for me to spot incorrect usage. I should not have allowed my bias to influence my criticism. I have learned a lot in this course and if I was asked to write this in a foreign language I could not get out a single coherent sentence without the use of an online translator. I should only point out errors in the code or other things of that nature. To whom ever wrote this course thank you.
Hello @hskramer ,
You don’t have to apologize at all. Any kind of constructive criticism (as it is always your case) is welcomed from our side, either it is code-related or any other kind of feedback. In fact, the way a course is written is a very important part of it, since it can make things easier for the student or harder (as it looks like it was your case).
So please, don’t hesitate in letting us know any kind of feedback related to our courses since our goal is to make our Academy better and better every day. I’m going to try to reserve some time this week to work on improving this course following your feedback.
If there’s anything I can do to help let me know and I will. Some of that need to addressed are:
The parameter file has -0.7 - 0.7 for 23 degrees which is not correct. I found that using 23 degrees works well and changed the values to -0.4 - 0.4. Sarsa algorithm needs to be updated with action2. This was already pointed out by r2s.sugreev in here. It can be found just be searching for Sarsa. This are probably the two most important ones.