Skip to main content

Posts

Showing posts from July, 2022

FastAI Deep Learning Journey Part 12: MidLevel API applied to Siamese Networks - Whale tracking application

Data Scientists, particularly strong coders, do not like to leverage high level apis without being able to know how to customize the framework for their specific applications. When one see that fastai is able to perform so many steps including data loaders, shuffling, augmentations, transfer learning... in a few lines of code, one is both amazed and terrified. How do I know what is going on under the hood?  If you are the ones like me willing to understand what's going on without going line by line of the source code, you are fine with the documentation and tutorials. If you are willing to be able to debug every single line of code, or need to customize fastai for your problem, do not worry, the mid and low api is for you.  In this post, I will show you how to create your own transforms, pipeline, tensors, data loaders and learners for both text and computer vision problems. To make things more spicy and real, I show how fastai can be use to build siamese networks with much less ef

FastAI Deep Learning Journey Part 11: Text embeddings for almost any downstream task, or universal language fine tuning!

  Natural language processing is booming with thousands of applications with a formidable level of accuracy . In this post we will show how fastai ensures that your language model (and its text embeddings) are sufficiently fine tuned for your downstream task, without the need to use supervised learning. This is going to be more computationally heavy than usual, so when running the nlp repo , make sure you have a GPU and something else to do the couple of hours... let's get started! Univsersal Language Model Fine-tuning, the paper Transfer learning on computer vision is well stablished, almost anyone starts now with a pretrained model from imagenet (resnet 18, 34...), and as we have seen in our previous posts, we only have to fine tune the last layers of the network to get state of the art results fine tuning in computer vision .  Fine tunning in NLP is less known, and most either train a relatively mediocre model from scratch, due to corpora and computing limitations, or stay to a

FastAI Deep Learning Journey Part 10: Tabular modeling, and the rise of categorical embeddings

Tabular data is the most common learning problem in industry , whether you are trying to predict churn, build a recommender system, or classify consumers you are likely going to use as a input a matrix where columns are variables and rows are observations.  In this problems, we normally work with both categorical and continous variables , and there is a very common challenge that overlooked in most machine learning courses and also among practitioners. I will phrase it as a question: If models require inputs in the form of numbers and continous variables tend to help more in the learning process and overfit less that discrete levels, how can we map categorical variables into the continuous space? The anwser to this very essential question can be found in the fastAI course or in the following paper   Entity Embeddings on categorical variables . I will summarize the key takeaways from the fastAI course and the paper in this post, as well as to confirm that the results generalize exactly