Beginning Machine Learning with Keras & Core ML

hi! if your working directory name contains space characters, put quotation marks around the -v value:

docker run --rm -it -p 8888:8888 -v "$(pwd)/notebook:/workspace/notebook" keras-mnist

OK, resolved, it was caused by container building that was not completed correctly

Yes, I got it, Thanks its a great tutorial!! :slight_smile:

This is a great tutorial !!

As I am running low on space on my Mac and I still have Anaconda installed from the previous tutorial (https://www.raywenderlich.com/180830/beginning-machine-learning-scikit-learn) I uninstalled Docker and in the process of removing Keras.

2 simple questions:

  • best way to completely uninstall keras ?
  • why use docker ? Coudn’t we had installed keras in Anaconda with conda install ? (This is what I plan on doing BTW. To have all AI related through Anaconda)

thanks Will!

both Docker and Anaconda are widely used for ML; Docker has the advantage that you can easily install and remove everything in a Docker image. Especially when working with TensorFlow and Keras, which seem not to stay entirely within their conda environment — TensorFlow’s installation instructions say to use pip install within conda; since Keras installs TensorFlow, the same advice holds.

however, to remove Docker images, it’s easiest to do with Docker (I actually don’t know any other way, but I don’t want to say “the only way is
”). So reinstall Docker, then run these command lines:

docker container ls -a

If there are any containers still around, run this command:

docker container kill <IDs of containers>

Then look for Docker images:

docker images -a

Then remove these images:

docker image rm -f <names or IDs of images>

Note that image is singular in this command, plural in the previous command.

BTW if you’re low on disk space, consider using the cloud to archive stuff you don’t use everyday. Dropbox lets you specify which folders to sync with your Mac, so you can upload stuff there, not sync it, so it doesn’t use your Mac disk space — but you can still access it when you need to, via the dropbox website.

Google drive (or whatever they call it now) might have similar capability.

Also, my tutorial came out a week earlier than Mikael’s :wink:

Audrey, Thank you very much !!
I find these series of tutorials on machine learning fascinating and excellently written.
I would like to keep on learning on this.
Keep them coming please !

If I want to learn to create 2 agents to play a game between them so they learn to play through several iterations, what would be the way to approach this ? It could be a simple game like tic-tac-toe.

thanks! I’m pretty sure there will be more!

to learn something new, I start by looking at examples posted online, for example:

then follow up on keywords, functions etc

happy hunting!

Great pointers. Thank you again audrey !
You are awesome

1 Like

When I run the command docker run --rm -it -p 8888:8888 -v $(pwd)/notebook:/workspace/notebook keras-mnist I see a few warings like The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations. From what I’ve read, recompiling TensorFlow from source with SSE3, SSE4.1, AVX etc. options are giving 30% to 45% speed increases. Is there a way to do this via Docker?

Docker just downloads a version of TensorFlow — it’s listed in requirements.txt. See if google can find the right version of TF? Maybe not official, but someone might have recompiled it already?

Actually, now that I’ve used Anaconda for the Create ML tutorial, I’d switch to that for Keras. That tutorial has a yaml file to create a Keras env, but you’d have to check the TF version.

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!