DL-With-PyTorch

Using Convolution to Generalize

Convolutions Convolutions deliver locality and translation invariance If we want to recognize patterns corresponding to objects, we will likely need to look at how nearby pixels are arranged, and we will be less interested in how pixels that are far from each other appear in combination.

2020-10-27

Learning from Images

Dataset of images torchvision module: automatically download the dataset load it as a collection of PyTorch tensors For example, download CIFAR-10 dataset: from torchvision import datasets data_path = '../data-unversioned/p1ch7/' # root directory # Instantiates a dataset for the training data; # TorchVision downloads the data if it is not present.

2020-10-26

Using Neural Network to Fit Data

Artficial neurons Core of deep learning are neural networks: mathematical entities capable of representing complicated functions through a composition of simpler functions. The basic building block of these complicated functions is the neuron

2020-10-26

The Mechanics of Learning

import torch Learning is just parameter estimation Given input data corresponding desired outputs (ground truth) initial values for the weights The model is fed input data (forward pass) A measure of the error is evaluated by comparing the resulting outputs to the ground truth In order to optimize the parameter of the model (its weights) The change in the error following a unit change in weights (that is, the gradient of the error with respect to the parameters) is computed using the chain rule for the derivative of a composite function (backward pass) The value of the weights is then updated in the direction that leads to a decrease in the error The procedure is repeated until the error, evaluated on unseen data, falls below an acceptable level.

2020-10-24

Real-world Data Representation Using Tensors

import torch Images An image is represented as a collection of scalars arranged in a regular grid with a height and a width (in pixels). grayscale image: single scalar per grid point (the pixel) multi-color image: multiple scalars per grid point, which would typically represent different colors.

2020-10-21

PyTorch Tensor

import torch The world as floating-point numbers Neural networks transform floating-point representations into other floating- point representations. The starting and ending representations are typically human interpretable, but the intermediate representations are less so.

2020-10-19

Pretrained Networks

Pretrained Network for Object Recognition Use pretrained network in TorchVision The TorchVision project contains a few of the best-performing neural network architectures for computer vision, such as AlexNet (http://mng.bz/lo6z) ResNet (https://arxiv.

2020-10-18

Deep Learning with PyTorch

Summary of the book 'Deep Learning with PyTorch' officially released by PyTorch.

2020-10-18