concept dataset in category pytorch

appears as: datasets, dataset, datasets, dataset
Cloud Native Machine Learning: Deploying PyTorch models on AWS

This is an excerpt from Manning's book Cloud Native Machine Learning: Deploying PyTorch models on AWS.

How much data should the platform be able to store and process? AcademicTorrents.com is a website dedicated to helping machine learning practitioners get access to public datasets suitable for machine learning. The website lists over 50TB of datasets, of which the largest are 1-5TB is size. Kaggle, a website popular for hosting data science competitions, includes datasets as large as 3TB. You might be tempted to ignore the largest datasets as outliers and focus on more common datasets that are at the scale of gigabytes. However, you should keep in mind that successes in machine learning are often due to reliance on larger datasets. "The Unreasonable Effectiveness of Data" by Peter Norvig et al. ( static.googleusercontent.com/media/research.google.com/en//pubs/archive/35179.pdf ), argues in favor of the machine learning systems that can take advantage of larger datasets: "simple models and a lot of data trump more elaborate models based on less data".

A machine learning platform that is expected to operate at a scale of terabytes to petabytes of data for storage and processing must be built as a distributed computing system, using multiple inter-networked servers in a cluster, each processing a part of the dataset. Otherwise, a dataset with a size of hundreds of gigabytes to terabytes will cause out of memory problems when processed by a single server with a typical hardware configuration. Having a cluster of servers as part of a machine learning platform also addresses the input/output bandwidth limitations of individual servers. Most servers can supply a CPU with just a few gigabytes of data per second. This means that most types of data processing performed by a machine learning platform can be sped up by splitting up the datasets in chunks (sometimes called shards) that are processed in parallel by the servers in the cluster. The distributed systems design for a machine learning platform as described in this paragraph is commonly known as scaling-out.

2.1.6  Downloading and unzipping the dataset

Start with the dataset by downloading and unzipping the files from opendata.dc.gov [4]. Once the files are downloaded, you should be able to confirm that you have the data for years 2015 through 2019, consisting of a separate zip file for each year. Note that the dataset for 2019 is limited to the data from January through June. After you unzip the files, the entire dataset should take up to 12 GiB of disk space.

Deep Learning with PyTorch

This is an excerpt from Manning's book Deep Learning with PyTorch.

Deep learning is a huge space. In this book, we will be covering a tiny part of that space: specifically, using PyTorch for smaller-scope classification and segmentation projects, with image processing of 2D and 3D datasets used for most of the motivating examples. This book focuses on practical PyTorch, with the aim of covering enough ground to allow you to solve real-world machine learning problems, such as in vision, with deep learning or explore new models as they pop up in research literature. Most, if not all, of the latest publications related to deep learning research can be found in the arXiV public preprint repository, hosted at https://arxiv.org.2

Figure 7.14 A data loader dispensing minibatches by using a dataset to sample individual data items

Samplers can reshape datasets

One of the optional arguments to DataLoader is sampler=... . This allows the data loader to override the iteration order native to the dataset passed in and instead shape, limit, or reemphasize the underlying data as desired. This can be incredibly useful when working with a dataset that isn’t under your control. Taking a public dataset and reshaping it to meet your needs is far less work than reimplementing that dataset from scratch.

The downside is that many of the mutations we could accomplish with samplers require that we break encapsulation of the underlying dataset. For example, let’s assume we have a dataset like CIFAR-10 (www.cs.toronto.edu/~kriz/cifar.html) that consists of 10 equally weighted classes, and we want to instead have 1 class (say, “airplane”) now make up 50% of all of the training images. We could decide to use WeightedRandomSampler (http://mng.bz/8plK) and weight each of the “airplane” sample indexes higher, but constructing the weights argument requires that we know in advance which indexes are airplanes.