This post walks through how to create a Siamese network using FastAI. It is based on a tutorial from FastAI, so some of the classes and function are directly copied from there, but I’ve adding things as well.
Saving and loading neural networks is always a little tricky. The best way to do it depends on what exactly you’re trying to do. Do you want to continue training the model? If so, you’ll need to save the optimizer state. If you just want to run it for inference, you might not need this. It also gets more complicated with custom functions. In this post I’ll walk through how to save a FastAI model and then load it again for inference.
This post is a collection of some notes and thoughts I’ve had when working with FastAI.
There’s a common warning in pandas about a SettingWithCopyWarning. While the error message covers some of the possible reasons for the error, it doesn’t cover them all. In this post, I’ll show another source of the error and how to fix it.
This blog posts shows some ways to get generally good performance on tabular data. Most of the work in getting high performance models from tabular data comes from cleaning the dataset, clever feature engineering, and other tasks specific to the data set. We won’t be doing that here. However, there’s still a need for some good baseline parameters to know you’re getting the best out of your model. This post provides a way to use Bayesian optimization to find good hyperparameters and get good performance.
This post is a tutorial on working with tabular data using FastAI. One of FastAI biggest contributions in working with tabular data is the ease with which embeddings can be used for categorical variables. I have found that using embeddings for categorical variables results in significantly better models than the alternatives (e.g. one-hot encoding). I have found that the combination of embeddings and neural networks reach very high performance with tabular data.
In this tutorial, I will be looking at how to prepare a semantic segmentation dataset for use with FastAI. I will be using the Chest X-Ray Images (Pneumonia) dataset from Kaggle as an example. This post focuses on the components that are specific to semantic segmentation. To see tricks and tips for using FastAI with data in general, see my FastAI Data Tutorial - Image Classification.