A step-by-step quick start guide for SageMaker Studio. Start a Studio session, launch a notebook on a GPU instance and run object detection inference with a detectron2 pre-trained model.
PyTorch one hot encoding
PyTorch has a one_hot() function for converting class indices to one-hot encoded targets.
Numpy pad: Understanding np.pad()
The np.pad() function has a complex, powerful API. But basic usage is very simple and complex usage is achievable! This post shows you how to use NumPy pad and gives a couple examples.
Iterating over rows in Pandas
When you absolutely have to iterate over rows in a Pandas DataFrame, use the .itertuples() method.
The PyTorch softmax() function with example usage
You can use the top-level torch.softmax() function from PyTorch for your softmax activation needs.
Installing packages in a Jupyter notebook
This post describes a trick for installing/upgrading Python packages in a Jupyter notebook. It's useful for scratch code, but don't do this when you need reproducible code.
The quick start guide to plotting histograms in Seaborn
The histplot() function in Seaborn is a great API for plotting histograms to visualize the distribution of your Pandas columns.