deep learning course by udacity
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assignments trying 5 layers and 2 layer nn with different loss function Mar 10, 2016
.gitignore Initial commit Jan 22, 2016
README.md add show images in ipython notebook to readme Mar 8, 2016
softmax.py softmax solution Jan 22, 2016

README.md

udacity.ud730.deeplearning

deep learning course by udacity

Over this readme the name of the image will be udacity. You can name containers by using the --name

run assignments:

docker run --name udacity -p 8888:8888 -it --rm b.gcr.io/tensorflow-udacity/assignments

find virtual machine's IP:

$ docker-machine.exe ip default
192.168.99.xxx

go to http://192.168.99.xxx:8888

how to login into docker hub

$ docker login https://index.docker.io/v1/

issues with login in windows? check this out DockerToolbox in windows Login/push doesnt works properly (With a workaround)

save current docker

  1. login to docker hub
  2. To get current container names do docker ps
  3. commit container
docker commit udacity user/repository
  1. push the container
docker push index.docker.io/username/repository

access docker container through a terminal.

docker exec -it udacity bash

run container without loosing your data

docker run --name udacity -p 8888:8888 -v /c/Users/username/yourpathto/assignments/:/notebooks -it --rm b.gcr.io/tensorflow-udacity/assignments

Note: on windows machines you cannot mount volumes outside of c:/Users/username because reasons

If you are using Docker Machine on Mac or Windows, your Docker daemon has only limited access to your OS X or Windows filesystem. Docker Machine tries to auto-share your /Users (OS X) or C:\Users (Windows) directory.

memory errors

you might be getting memory errors like the following:

---------------------------------------------------------------------------
MemoryError                               Traceback (most recent call last)
<ipython-input-8-5158e101f707> in <module>()
     37   print('Labels:', labels.shape)
     38   return dataset, labels
---> 39 train_dataset, train_labels = load(train_folders, 450000, 550000)
     40 test_dataset, test_labels = load(test_folders, 18000, 20000)

<ipython-input-8-5158e101f707> in load(data_folders, min_num_images, max_num_images)
     34   print('Full dataset tensor:', dataset.shape)
     35   print('Mean:', np.mean(dataset))
---> 36   print('Standard deviation:', np.std(dataset))
     37   print('Labels:', labels.shape)

Try changing the RAM you provide to your docker container. To do this use the -m or --memory

example:

docker run --name udacity --memory 4096m -p 8888:8888 -v /c/Users/username/yourpathto/assignments/:/notebooks -it --rm b.gcr.io/tensorflow-udacity/assignments

check your memory:

To check that the change of memory took place run the following script in a the python notebook.

import os
mem_bytes = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')  # e.g. 4015976448
mem_gib = mem_bytes/(1024.**3)  # e.g. 3.74

If the memory is not what you expect you might need to turn down your containers, open virtual box and change the ram settings there before running the docker run cmd again.

show images in ipython notebook

you need to add %matplotlib inline to be able to show images in your ipython notebook.

# you need a matplotlib inline to be able to show images in python notebook
%matplotlib inline
plt.imshow(train_dataset[0])
plt.title("Char " + str(train_labels[0]))