Getting into Week 2 of this years course and being in isolation, I finally got around to starting my own blog using fastpages. So here goes the first post which outlines the fastai style to master deep learning.
This will be followed by a series of posts going through my learnings in the course and hacking away at the fastai v2 library! Happy learning everyone and stay safe!
Thanks a lot to veterans like @muellerzr, @init_27 and @arora_aman for encouraging us to start publishing stuff in our learning journey!
Particularly, for the first example, I followed @radekwonderful notebook on audio classification and applied it to a different multi-label classification dataset.
Also, added an example on how to read four channel images using fastai for Protein Classification. Credits given to @akashpalrecha, @init_27 and @barnacl for working on the second example together.
Itās a detailed description on how to pip install the fastai2 package using 3 different methods, and which method to pick depending on someoneās use-case.
Method 1: Installing from pypi repository
Method 2: Installing from GitHub - Non-editable package
Method 3: Installing from GitHub - Editable package
@sgugger@jeremy (apologies for tagging you guys directly as I know you receive a ton of notifications).
I put together this notebook to experiment with text classification.
As I clearly state in section 2. Training a text classifier to detect human VS machine articles I leverage a lot of the code in this chapter of fastbook.
The last thing I want to do is to break the bookās license or any community policy.
Is what I am doing allowed?
If not, I will immediately remove the notebook from my repo.
Thanks a lot!
I finished fastai2 Image Augmentation using fastpages and it looks at the image augmentation pipeline. Would love to get feedback/check for errors or misunderstandings.
I do have a question though on the pipeline and havenāt been able to figure out what the differences are with these pipelines (in particular RandomResizedCrop and RandomResizedCropGPU)
In the default state the dls.after_batch pipeline looks like this: Pipeline: IntToFloatTensor -> AffineCoordTfm -> LightingTfm
If we were to add a min_scale value to aug_transforms the pipeline now looks like this: Pipeline: IntToFloatTensor -> AffineCoordTfm -> RandomResizedCropGPU -> LightingTfm
However we can also add RandomResizedCrop, the pipeline is now: Pipeline: RandomResizedCrop -> IntToFloatTensor -> AffineCoordTfm -> RandomResizedCropGPU -> LightingTfm
I donāt visually see any differences in the batches between 2 and 3.
I understand that the order values determine where the transforms are positioned but what is difference between RandomResizedCrop and RandomResizedCropGPU and why the different orders for both, RandomResizedCrop is order 1 and GPU order 40?
This I believe is due to RRCGPU being pushed to the GPU, so everything is already in a batch by this point (as anything we push to the GPU should be by then).
I thought it was something on those lines so in that case would it more efficient to always use RandomResizedCropGPU instead of RandomResizedCrop? (although I did not notice any differences in training time between the two)
It depends on the use case. If youāre trying to make all the images the same size via RRC (similar to pre-sizing in a way) then no because youād probably want that as an item transform before turning it into a batch. However if you want it in as just regular added augmentation later then yes.
I almost forgot to put this here.
A few days ago I wrote a blog that aims to explain exactly how splits and split_idxs work inside of fastai2 and how to use that knowledge to control exactly what split of your data (i.e. train, valid, test, etc.) each of your Transforms is applied to. An instance where this can be useful is when you want to turn off certain image augmentations for your validation set.
Here it is: Using separate Transforms for your training and validation sets in fastai2
Itās kind of rough at this point simply because I wanted to finish it off quickly . But I guess it gets the point across.
Finally found my v2 project! Think my blog will morph to cover this. Just put up the first post on complex initialization. Right now it doesnāt use fastai, but building towards itā¦
Iām still working my way around all the functionalities of L and the post is by no means complete. Will try to add on as I discover other stuff. Any suggestions/feedback is highly welcome and anyone who has come across better use cases of L, please do let me know!
Still working out a few issues with my fastpages implementation, but feel free to add my blog. Itās at https://ohmeow.com.
In honor of last weekās lecture, my first post is how cross-entropy loss works. Given that we just started learning about loss functions and have been using cross-entropy loss since week 1 (whether we knew it or not), I wanted to add some intuition behind how it works and why its the defacto go-to for mult-classification tasks
I really enjoyed your post, it really explains the journey many of us make before we find fast.ai, the funny thing is once you learn fast.ai all the other ML theory courses become much more understandable.
Hereās a follow up post to the baseline image classification model built in my previous post.
In this one, I employ the techniques taught in the course, with an aim to build a benchmark image classifier on the flowers-102 dataset. You can see the post here.
As always please feel free to provide your feedback and your inputs on what I could have done differently! Stay home, stay safe and happy learning!
I donāt I just look at the notebook and then just push to Git mostly because GitHub actions is better at catching the stuff than I am! IIRC to do so you need to build the docker image (thereās directions, may be better suited for the blog sub forum )
In short, any function that can return strict increasing values from best prediction to worst prediction can be considered a loss function. I explain it with geometrical perspective rather than probabilities which I think make it easier to understand. The most basic loss function experimented is the dot-product loss function. Then I did some tweaks to improve the performance of my loss function comparing to the most popular loss function: cross-entropy loss function.
This approach of explaining multi-classes loss function is quite rare but I think easier to understand. It is all about vector and the logarithm in cross-entropy is just a tweak to make the function penalize more the wrong prediction.