Recipe

TorchVision Transforms: Image Preprocessing in PyTorch

2021-03-19

TorchVision, a PyTorch computer vision package, has a great API for image pre-processing in its torchvision.transforms module. This post gives some basic usage examples, describes the API and shows you how to create and use custom image transforms.

Binary Cross Entropy Explained

Posted 2021-02-22 • Updated 2021-03-01

A simple NumPy implementation of the binary cross entropy loss function and some intuition about why it works.

NumPy Meshgrid: Understanding np.meshgrid()

2021-02-09

You can create multi-dimensional coordinate arrays using the np.meshgrid() function, which is also available in PyTorch and TensorFlow. But watch out! PyTorch uses different indexing by default so the results might not be the same.

SageMaker Studio Quick Start

2021-02-08

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.