RStudio AI Blog: Classifying images with torch

#artificialintelligence 

In recent posts, we've been exploring essential torch functionality: tensors, the sine qua non of every deep learning framework; autograd, torch's implementation of reverse-mode automatic differentiation; modules, composable building blocks of neural networks; and optimizers, the – well – optimization algorithms that torch provides. But we haven't really had our "hello world" moment yet, at least not if by "hello world" you mean the inevitable deep learning experience of classifying pets. We'll distinguish ourselves by asking a (slightly) different question: What kind of bird? How to apply transforms, both for image preprocessing and data augmentation. How to use Resnet (He et al. 2015), a pre-trained model that comes with torchvision, for transfer learning.