00:03:04 Review of last week lesson on RNNs,
Part 1, what to expect in Part 2 (start date: 19/03/2018)
00:08:48 Building the RNN model with âself.init_hidden(bs)â and âself.hâ, the âback prop through time (BPTT)â approach
00:17:50 Creating mini-batches, âsplit in 64 equal size chunksâ not âsplit in chunks of size 64â, questions on data augmentation and choosing a BPTT size, PyTorch QRNN
00:23:41 Using the data formats for your API, changing your data format vs creating a new dataset class, âdata.Field()â
00:24:45 How to create Nietzsche training/validation data
00:35:43 Dealing with PyTorch not accepting a âRank 3 Tensorâ, only Rank 2 or 4, âF.log_softmax()â
00:44:05 Question on âF.tanh()â, tanh activation function,
replacing the âRNNCellâ by âGRUCellâ
00:47:15 Intro to GRU cell (RNNCell has gradient explosion problem - i.e. you need to use low learning rate and small BPTT)
00:53:40 Long Short Term Memory (LSTM), âLayerOptimizer()â, Cosine Annealing âCosAnneal()â
01:01:57 Back to Computer Vision with CIFAR 10 and âlesson7-cifar10.ipynbâ notebook, Why study research on CIFAR 10 vs ImageNet vs MNIST ?
01:08:54 Looking at a Fully Connected Model, based on a notebook from student âKerem Turgutluâ, then a CNN model (with Excel demo)
01:21:54 Refactored the model with new class âConvLayer()â and âpaddingâ
01:25:40 Using Batch Normalization (BatchNorm) to make the model more resilient, âBnLayer()â and âConvBnNet()â
01:36:02 Previous bug in âMini netâ in âlesson5-movielens.ipynbâ, and many questions on BatchNorm, Lesson 7 Cifar10, AI/DL researchers vs practioners, âYann Lecunâ & âAli Rahimi talk at NIPS 2017â rigor/rigueur/theory/experiment.
01:52:43 Replace the model with ResNet, class âResnetLayer()â, using âboostingâ
01:58:38 âBottleneckâ layer with âBnLayer()â, âResNet 2â with âResnet2()â, Skipping Connections.
02:02:01 âlesson7-CAM.ipynbâ notebook, an intro to Part #2 using âDogs v Catsâ.
02:08:55 Class Activation Maps (CAM) of âDogs v Catsâ.
02:14:27 Questions to Jeremy: âYour journey into Deep Learningâ and âHow to keep up with important research for practionersâ,
âIf you intend to come to Part 2, you are expected to master all the techniques in Part 1â, Jeremyâs advice to master Part 1 and help new students in the incoming MOOC version to be released in January 2018.
In the lesson 7 video around 35m 44s, it is said that âLoss functions such as softmax are not happy receiving a rank 3 tensorâ. And around 40m 14s, we talk about sending rank 3 tensor to F.log_softmax and specify dim to let it know which axis to do softmax over.
I checked @timleeâs note and @EricPBâs timeline and they both say something along the line of âsoftmax isnât happy to accept rank3 tensorâ. But is this supposed to be F.null_loss function instead of F.log_softmax? My understanding is that instead of creating the custom loss function like we did in lesson 6, this time, we changed the output shape to rank 2 tensor to use the PyTorchâs loss function as is. Is that correct?
Actually in pytorch 0.3 softmax can handle higher dimensional tensors - the dim argument is new. So itâs possible some of the info in this video is a little out of date.
But youâre might be right that thereâs still an issue with nll_loss. Did you have a chance to look into this?
Hi, lesson7-cifar10
I do not find the RandomFlipXY() function in the âfastai/transforms.pyâ.
And I got a ânot found errorâ during my notebook execution.
So I replaced it by the RandomFlip() function to do my job from top to bottom without any problem.
Please, could someone provide more information about the RandomFlipXY()?
One technique that can be helpful, especially as the fast.ai codebase evolves past what is illustrated in these lessons is to use the blame and history buttons in github. blame will show you the commit associated with each line of code in the file. so you can see when it was changed and what the code was before.
history will show you all the commits for that file and what changed each time. this is also helpful to see what the code looked like before in case something changed that is no longer compatible with the notebook. Although for the most part, they are good at keeping the notebooks up to date but the code Jeremy shows in the video can easy get out of date.
Note the md = LanguageModelData.from_text_files(PATH, TEXT, **FILES, bs=bs, bptt=bptt, min_freq=3) line will error (slice returned empty tensor) if any lines in the file are empty. I found that the way I split the trn and val up I had empty lines only in the training so it seemed sensible to remove them, but itâd probably be better to tweak the fast.ai library to not error on them.
You can use rep -cvP '\S' trn/trn.txt to count the lines with whitespace, and sed -i '/^$/d' trn/trn.txt to remove them for now.
Iâm not sure if its just me but the images were not in the directories like the library was expecting. After downloading and renaming the top level directory to cifar10, I ran this script in each of the test and train folders to put them into labeled directories.
declare -a classes=(âplaneâ âautomobileâ âbirdâ âcatâ âdeerâ âdogâ âfrogâ âhorseâ âshipâ âtruckâ) && for i in {classes[@]}; do mkdir {i} && mv *{i}.png {i} ; done
Itâs not just you, Iâm also having the same issue.
This is how the dataset layout looks:
$ curl -sL http://pjreddie.com/media/files/cifar.tgz | tar -tzf- | head
cifar/
cifar/test/
cifar/test/3661_automobile.png
cifar/test/4572_bird.png
cifar/test/416_airplane.png
cifar/test/4863_automobile.png
cifar/test/9523_dog.png
cifar/test/3612_automobile.png
cifar/test/9090_bird.png
cifar/test/3443_deer.png
Iâve wanted to make a PR, but it seemed somewhat intrusive to make a pull request for the notebook.
Here is my Python solution:
def to_label_subdirs(path, subdirs, classes, labelfn):
for sd in subdirs:
for rf in os.listdir(os.path.join(path, sd)):
af = os.path.join(path, sd, rf)
if not os.path.isfile(af):
continue
lb = labelfn(rf)
if not lb:
continue
os.renames(af, os.path.join(path, sd, lb, rf))
Then, somewhere before the definition of get_data:
Now itâs not so nice because other threads pushed the wiki threads out of the top.
@rachel Is it possible to pin the wiki threads? They are very important for the course, but now one should search the forums to get to them. It can be quite confusing for people that are just starting the course (it certainly was confusing for me). There are links to wikis from the pages with video lectures, but I guess it would be nice to have them organized in one place.
The other option is to create an index page with links to the wikis, and pin the index page instead.