Appendix B Deep learning basics
Appendix B Deep learning basics
APPENDIX
Deep learning basics
B
With special contributions from Carl Pearson and Boris Ginsburg Machine learning, a term coined by Arthur Samuel of IBM in 1959 [1], is a field of computer science which studies methods for learning application logic from data rather than designing explicit algorithms. Machine learning is most successful in computing tasks where designing explicit algorithms is infeasible, mostly because there is not enough knowledge in the design of such explicit algorithms. That is, one can give examples on what should happen in various situations but not general rules for making such decisions for all possible inputs. For example, machine learning has contributed to the recent improvements in application areas such as automatic speech recognition, computer vision, natural language processing, and recommender systems. In these application areas, one can provide many input examples and what should come out for each input, but there is no algorithm that can correctly process all possible inputs. The kinds of application logic created with machine learning can be organized according to the types of tasks that they perform. There is a wide range of machine learning tasks. Here we show a few out of a large number: • Classification – to determine to which of the k categories an input belongs. An example is object recognition: which type of food is shown in this photo? • Regression – to predict a numerical value given some inputs. An example is to predict the price of a stock at the end of the next trading day. • Transcription – to convert unstructured data into textual form. An example is optical character recognition. • Translation – to convert a sequence of symbols in one language to a sequence of symbols in another. An example is translating from English to Chinese. • Embedding – to convert an input to a vector while preserving relationships between entities. An example is to convert a natural language sentence into a multidimensional vector. The readers are referred to a large body of literature on the mathematical background and practical solutions to the various tasks of machine learning. The purpose of this appendix is to introduce the computation kernels involved in the neural network approach to the classification task. A concrete understanding of these kernels will allow the reader to understand and develop kernels for deep learning approaches to other machine learning tasks. As such, in the next section, we will go into details of the classification task to establish the background knowledge needed to understand neural networks.
Machine learning, a term coined by Arthur Samuel of IBM in 1959 [1], is a field of computer science which studies methods for learning application logic from data rather than designing explicit algorithms. Machine learning is most successful in computing tasks where designing explicit algorithms is infeasible, mostly because there is not enough knowledge in the design of such explicit algorithms. That is, one can give examples on what should happen in various situations but not general rules for making such decisions for all possible inputs. For example, machine learning has contributed to the recent improvements in application areas such as automatic speech recognition, computer vision, natural language processing, and recommender systems. In these application areas, one can provide many input examples and what should come out for each input, but there is no algorithm that can correctly process all possible inputs.
The kinds of application logic created with machine learning can be organized according to the types of tasks that they perform. There is a wide range of machine learning tasks. Here we show a few out of a large number:
- Classification – to determine to which of the k categories an input belongs. An example is object recognition: which type of food is shown in this photo?
- Regression – to predict a numerical value given some inputs. An example is to predict the price of a stock at the end of the next trading day.
- Transcription – to convert unstructured data into textual form. An example is optical character recognition.
- Translation – to convert a sequence of symbols in one language to a sequence of symbols in another. An example is translating from English to Chinese.
- Embedding – to convert an input to a vector while preserving relationships between entities. An example is to convert a natural language sentence into a multi-dimensional vector.
The readers are referred to a large body of literature on the mathematical background and practical solutions to the various tasks of machine learning. The purpose of this appendix is to introduce the computation kernels involved in the neural network approach to the classification task. A concrete understanding of these kernels will allow the reader to understand and develop kernels for deep learning approaches to other machine learning tasks. As such, in the next section, we will go into details of the classification task to establish the background knowledge needed to understand neural networks.
B.1 Classifiers
In machine learning, a classifier is a function f that performs a classification task by mapping an n-dimensional vector input to one of the k categories or labels: f : R n → 1, 2, …, k (B.1)
For example, the input may be a 2-dimensional vector (n = 2) whose first element is the income level of a person and the second element is the age of the same person. A classifier f may be defined to map a person with such a vector to one of the four (k = 4) categories: person with post-graduate degree (1), person with bachelor’s degree (2), high school graduate (3), or none of the above (4). The classifier function f is a mathematical expression parameterized by θ that defines how the input vector x is mapped to numerical code y, i.e.: y = f (x, θ )
(B.2)
The parameter θ is commonly referred to as the model. It encapsulates f ’s mathematical expression coefficients that are learned from data. This definition of θ is best illustrated with a concrete example. Let us consider a type of classifiers called perceptron [2]: y = sign(W · x + b)
(B.3)
where W is a vector of coefficients for the input vector x and b is a bias constant. W and x are of the same length. The sign function returns value 1 if its input is positive, 0 if its input is 0, and −1 if its input is negative. That is, the sign function as a classifier activates, i.e., finalizes, the mapping of the input value into three categories: −1, 0, 1, thus it is often called the activation function. Activation functions introduce non-linearity into an otherwise linear function of a perceptron. In this case, the model θ is the combination of the vector W and the constant b. The structure of the model is a sign function whose input is a linear expression of input x elements where the coefficients are elements of W (i.e., dot product between the W vector and the x vector), and the constant is b. Since the elements of W are multiplied with the elements of x before the pairwise products are summed up in the dot product, they serve as weighing coefficients for the x elements in the final sum. Therefore, they are commonly referred to as the W eights of the model. Since f is a linear function of x that feeds into the activation sign function, perceptrons are a form of linear classifiers. Fig. B.1 shows a perceptron example where each input is a 2D vector (x1, x2 ). The perceptron’s model θ consists of a weight vector (w1 , w2 ) and a bias constant b. As shown in Fig. B.1, the linear expression w1 · x1 + w2 · x2 + b defines a line in the x1 − x2 space that cuts the space into two parts: the part where all points make the expression greater than zero and the part where all points make the expression less than zero. All points on the line make the expression equal to 0.
FIGURE B.1. A perceptron linear classifier example where input is a 2D vector.
Visually, given a combination of (w1 , w2 ) and b values, we can draw a line in the x1 − x2 space as shown in Fig. B.1. For example, for a perceptron whose model is (w1 , w2 ) = (2, 3) and b = −6, we can easily draw a line by connecting the two intersection points with the x1 axis (i.e., ( −b w1 , 0) = (3, 0)) and with the x2 axis (i.e., −b (0, w2 ) = (0, 2)). The line thus drawn corresponds to the equation 2x1 + 3x2 − 6 = 0. With this drawing, we can easily visualize the outcome of input points: any point above the line (shown as darkly shaded dots in Fig. B.1) is classified as 1, any point on the line is classified as 0, and any point below the line (shown as lightly shaded dots in Fig. B.1) is classified as class −1. The process of computing the mapping for an input is commonly referred to as inference for the classifier. In the case of a perceptron, we simply plug the input coordinate values into y = sign(W · x + b). In our example, if the input point is (5, −1), we can perform inference by plugging its coordinates into the perceptron function: y = sign(2 ∗ 5 + 3 ∗ (−1) − 6) = sign(1) = 1 (B.4)
So, (5, −1) is classified to class 1, i.e., it is among the darkly shaded dots. Multi-layer Classifiers Linear classifiers are useful when there is a way to draw hyperplanes (i.e., lines in a 2D space and planes in a 3D space) that partition the space into regions and thus define each category of data points. Ideally, each category of data points should occupy exactly one such region. For example, in a 2D, 2-category classifier, we need to be able to draw a line that separates points of one category from those of the other. Unfortunately, this is not always feasible. Consider the classifiers in Fig. B.2. Assume that all input’s coordinates fall in the range of [0, 1]. The classifier should classify all points whose x1 and x2 values are both greater than 0.5 (points that fall in the upper right quadrant of the domain) as category 1 and the rest as category 0 or category −1. This classifier could be approximately implemented with a line like that shown in Fig. B.2(a). For example, FIGURE B.2 A multi-layer perceptron example.
a line 2x1 + 2x2 − 3 = 0 would classify most of the points properly. However, some of the lightly shaded points whose x1 and x2 are both greater than 0.5 but the sum is less than 1.5, e.g., (0.55, 0.65), would be misclassified into category −1 (darkly shaded). This is because any line will necessarily either cut away part of the upper right quadrant or include part of the rest of the domain. There is no single line that can properly classify all possible inputs. A multi-layer perceptron (MLP) allows the use of multiple lines to implement more complex classification patterns. In a multi-layer perceptron, each layer consists of one or more perceptrons. The outputs of perceptrons in one layer are the inputs to those in the next layer. An interesting and useful property is that while the inputs to the first layer have infinite number of possible values, the output of the first layer and thus the input to the second layer can have only a modest number of possible values. For example, if the perceptron from Fig. B.1 was used, as a first layer, its outputs are restricted to −1, 0, 1. Fig. B.2(b) shows a 2-layer perceptron that can precisely implement the desired classification pattern. The first layer consists of two perceptrons. The first one, y1 = sign(x1 − 0.5), classifies all points whose x1 coordinate is greater than 0.5 as class 1, i.e., the output value is 1. The rest of the points are classified as either category −1 or category 0. The second classifier in the first layer, y2 = sign(x2 − 0.5), classifies all points whose x2 coordinate is greater than 0.5 into category 1. The rest of the points are classified as category 0 or category −1.
FIGURE B.3. Need for perceptrons with more than two layers.
Therefore, the output of the first layer (y1 , y2 ) can only be one of the following nine possibilities: (−1, −1), (−1, 0), (−1, 1), (0, −1), (0, 0), (0, 1), (1, −1), (1, 0), (1,1). That is, there are only 9 possible input pair values to the second layer. Out of these nine possibilities, (1, 1) is special. All the original input points in the lightly shaded category are mapped to (1, 1) by the first layer. Therefore, we can use a simple perceptron in the second layer to draw a line between (1, 1) and the eight other possible points in the y1 − y2 space, as shown in Fig. B.2(b). This can be done by a line 2y1 + 2y2 − 3 = 0 or many other lines that are small variations of it. Let us use (0.55, 0.65) input that was misclassified by the single-layer perceptron in Fig. B.2(a). When processed by the two-layer perceptron, the upper perceptron of first layer in Fig. B.2(b) generates y1 = 1 and the lower perceptron generates y2 = 1. Based on these input values, the perceptron in the second layer generates z = 1, the correct classification for (0.55, 0.65). Note that there are still significant limitations of a two-layer perceptron. For example, assume that we need to build a perceptron to classify the input points shown in Fig. B.3(a). The values of the lightly shaded input points can result in input values (−1, −1) or (1, 1) to the second layer. We see that there is no way to draw a single line to properly classify the points in the second layer. We show in Fig. B.2(b) that we can add another line by adding another perceptron in the second layer. The function would be z2 = sign(−2y1 − 2y2 − 3) or small variations of it. The reader should verify that all darkly shaded points in Fig. B.3(b) will be mapped to the (−1, −1) in the z1 − z2 space. Whereas (1, 1) and (−1, −1) in the y1 − y2 space are mapped to (1, −1) and (−1, 1) in the z1 − z2 space. Now we can draw a line z1 + z2 + 1 = 0, or small variations of it, to properly classify the points, as shown in Fig. B.3(c). Obviously, if we need to partition the input domain into more regions, we might need even more layers to perform proper classification.
B.2 Fully connected and convolutional layers
Layer 1 in Fig. B.2(b) is a small example of a fully connected layer (FC), where every output (i.e., y1 , y2 ) is a function of every input (i.e., x1 , x2 ). In general, in afully connected layer, every one of the m outputs is a function of all the n inputs. All the weights of a fully connected layer form an m × n weight matrix W where each of the m rows is the weight vector (of size n elements) to be applied to the input vector (of size n elements) to produce one of the m outputs. Therefore, the process of evaluating all the outputs from the inputs of a fully connected layer is a matrix-vector multiplication. As we will see, fully connected layers are core components of many types of neural networks (including large language models), and we will further study their GPU implementations. Fully connected layers become extremely expensive when m and n become large. The main reason is that a fully connected layer requires an m × n weight matrix. For example, in an image recognition application, n is the number of pixels in the input image and m is the number of classifications that need to be performed on the input pixels. In this case, n is in the millions for high-resolution images and m can be in the hundreds or more depending on the variety of objects that need to be recognized. Also, the objects can be of different scales and orientations in the images; many classifiers may need to be in place to deal with these variations. Feeding all these classifiers with all inputs is both expensive and likely wasteful. Convolutional layers reduce the cost of fully connected layers by reducing the number of inputs each classifier takes and sharing the same weights across classifiers. In a convolutional layer, each classifier only takes a subset of the input vector, e.g., a patch of the input image, and performs convolution on the pixels in the patch based on the weights. The output is called an output feature map since each pixel in the output is the activation result of a classifier. Sharing weights across classifiers allows the convolutional layers to have large numbers of classifiers, i.e., large m values, without an excessive number of weights. Computationally, this can be implemented as a 2D convolution. However, this approach effectively applies the same classifier to different part of an image. One can have different sets of weights applied to the same input and generate multiple output feature maps, as we will see later in this appendix.
B.3 Convolutional neural networks
Convolutional neural network (CNN) is a category of feed-forward networks that are easier to train and that can be generalized much better than other deep learning models. The CNN was invented in late 1980s [4]. By the early 1990s, CNNs had been experimentally applied to automated speech recognition, optical character recognition (OCR), handwriting recognition, and face recognition [3]. However, until the late 1990s, the mainstream of computer vision and that of automated speech recognition had been based on carefully engineered features. The amount of labeled data was insufficient for training a deep-learning system to compete with recognition/classification functions crafted by human experts. Furthermore, it was a common belief that it was computationally infeasible to automatically learn the parameter values of hierarchical feature extractors with enough layers to outperform human-crafted application-specific feature extractors even if the required labeled datasets existed Interest in deep, feed-forward networks were revived around 2006 by a group of researchers who introduced unsupervised learning methods that could create multilayer, hierarchical feature detectors without requiring labeled data [5,6]. The first major application of this approach was in speech recognition. The breakthrough was made possible by GPUs that allowed researchers to train networks ten times faster than traditional CPUs. This advancement, coupled with the massive amount of media data available online, drastically elevated the position of deep-learning approaches. Despite their success in speech, convolutional neural networks were largely ignored in the field of computer vision until 2012. In 2012, a group of researchers from the University of Toronto trained a convolutional neural network to classify 1000 different classes in the ILSVRC contest [7]. The network was huge by the norms of the time: it had approximately 60 million parameters and 650,000 neurons. It was trained on 1.2 million high-resolution images from the ImageNet database. The network was trained in only one week on two GPUs using a CUDA-based convolutional neural network library written by Alex Krizhevsky [8]. The network achieved break-through results with a winning test error rate of 15.3%. In comparison, the second-place team that used the traditional FIGURE B.4 LeNet-5, a convolutional neural network for handwritten digit recognition. The letter A in the input should be classified as none of the 10 classes (digits).
computer vision algorithms had an error rate of 26.2%. This success triggered a revolution in computer vision, and convolutional neural networks became a mainstream tool in computer vision, natural language processing, reinforcement learning, and many other areas.
B.4 CNN inference and training: sequential implementation
This section presents a sequential implementation of CNN inference and training in preparation for their CUDA implementation. We will use LeNet-5, the network designed in the late 1980s for digit recognition [3]. As shown in Fig. B.4, LeNet-5 is composed from three types of layers: convolutional layers, subsampling layers, and fully connected layers. These three types of layers continue to be the key components of today’s neural networks. We will consider the logical design and sequential implementation of each type of layer. The input to the network is shown as a gray image with a hand-written digit represented as a 2D 32 × 32 pixel array. The last layer computes the output, which is the probability for the original image to belong to each one of the 10 classes (digits) that the network is set up to recognize. We will refer to inputs to and outputs from the CNN layers as feature maps, or simply, features. For example, in Fig. B.4, the computation of the C1 convolutional layer (Convolutions) at the input end of the network is organized to generate six (28 × 28) output feature maps from the (32 × 32) INPUT pixel array. The convolutional layer output to be produced for input feature maps consists of pixels, each of which is produced by performing a convolution between a small local patch of the feature map pixels produced by the previous layer (INPUT in the case of C1) and a set of weights (i.e., convolution filters as defined in Chapter 7) called a filter bank. The convolution result is then fed into an activation function like sigmoid (Section B.1) to produce an output pixel in the output feature map. One can think of the convolutional layer for each pixel of an output feature map as a perceptron (Section B.1) whose inputs are the patch of pixels in the input feature maps. That is, the value of each output pixel is the sum of convolution results from the corresponding patches in all input feature maps.
FIGURE B.5. Forward propagation path of a convolutional layer.
Fig. B.5 shows a small convolutional layer example. There are three input feature maps, two output feature maps, and six filter banks. Different input and output feature map pairs in a layer use different filter banks. Since there are three input feature maps and two output feature maps in Fig. B.5, we need 3 × 2 = 6 filter banks. For the C3 layer of LeNet in Fig. B.4, there are 6 input feature maps and 16 output feature maps. Thus, a total of 6 × 16 = 96 filter banks are used in C3. Fig. B.5(b) illustrates more details of the calculations done by a convolutional layer. We omitted the activation function for the output pixels for simplicity. We show that each output feature map is the sum of convolutions of all input feature maps. For example, the upper left corner element of output feature map 0 (value 14) is calculated as the convolution between the circled patch of input feature maps and the corresponding filter banks1 : (1, 2, 1, 1) · (1, 1, 2, 2) + (0, 2, 0, 3) · (1, 1, 1, 1) + (1, 2, 0, 1) · (0, 1, 1, 0) = 1 + 2 + 2 + 2 + 0 + 2 + 0 + 3 + 0 + 2 + 0 + 0 = 14 (B.20) One can also think of the three 2D input maps as a 3D input feature map and the three 2D filter banks as a 3D filter bank. In Fig. B.5(b), the three 2D filter banks on the left form a 3D filter bank and the three on the right form a second 3D filter bank. In general, if a convolutional layer has n input feature maps and m output feature maps, n ∗ m different 2D filter banks will be used. One can also think about these filter banks as m 3D filter banks. Although not shown in Fig. B.4, all 2D filter banks used in LeNet-5 are 5 × 5 convolution filters. Fig. B.6 shows convLayer_forward, a sequential C function implementation of the forward propagation path of a convolutional layer. The input feature maps are stored in a 3D array parameter X[C, H, W], where C is the second input parameter 1 Although we use integer values for elements in the feature maps and filter bank for simplicity, they arefloating numbers in reality.
FIGURE B.6. A C implementation of the forward propagation path of a convolutional layer.
that specifies number of input feature maps, H is the third input parameter that specifies the height of each input map image, and W is the fourth input parameter that specifies the width of each input map image (line 1). That is, the highest dimension index for X selects one of the feature maps (often referred to as channels) and the indices of the lower two dimensions select one of the pixels in an input feature map. For example, the input feature maps for the C1 layer of Fig. B.4 are stored in X[1, 32, 32] since there is only one input feature map (INPUT in Fig. B.4) that consists of 32 pixels in each of the x and y dimensions. This also reflects the fact that one can think of the 2D input feature maps to a layer altogether form a 3D input feature map, which is also referred to as the input tensor to the layer. The output feature maps of a convolutional layer are to be stored in a 3D array parameter Y[M, H-K + 1, W-K + 1], where M is the number of output feature maps and K is the height (and width) of each 2D filter (line 1). For example, the output feature maps for the C1 layer in Fig. B.4 is stored in Y[6, 28, 28] since C1 generates six output feature maps using 5 × 5 filters. The filter banks are stored in a 4D array parameter W[M, C, K, K].2 There are M × C filter banks, one for each pair of input feature map and output feature map. Filter bank W[m, c, _, _] is used when using input feature map X[c, _, _] to calculate output feature map Y[m, _, _]. Recall that each output feature map is the sum of convolutions of all input feature maps. 2 Note that W is used for both the width of images and the name of the filter bank (weight) matrix. In eachcase, the usage should be clear from the context.
Each iteration of the outermost (m) for-loop (lines 4-12) generates an output feature map. Each iteration of the next two levels (h and w) of for-loops (lines 5-12) generates one pixel of the current output feature map. The next three loop levels (lines 8-11) perform the convolution between the input feature maps and the associated filter banks before accumulating the convolution result for each input feature map into the output feature map (line 11). The output feature maps of a convolutional layer typically go through a subsampling (also known as pooling) layer. The S2 and S4 layers in Fig. B.4 are examples of sampling layers. A subsampling layer reduces the size of image maps by combining pixels. They are used to allow subsequent convolution layers to classify larger-scale patterns without using larger convolution masks. For example, in Fig. B.4, subsampling layer S2 takes the 6 input feature maps of size 28 × 28 and generates 6 feature maps of size 14 × 14. Each pixel in a subsampling output feature map is generated from a 2 × 2 neighborhood in the corresponding input feature map. The values of these four pixels are averaged to form one pixel in the output feature map. One can also use different ways to combine the pixel values in the neighborhood into a subsampled pixel. The output of a subsampling layer has the same number of output feature maps as the previous layer, but each map has half the number of rows and columns. For example, the number of output feature maps (6) of the subsampling layer S2 is the same as the number of its input feature maps, or the output feature maps of the convolutional layer C1. Fig. B.7 shows a sequential C implementation of the forward propagation path of a subsampling layer. Each iteration of the outermost (m) for-loop (lines 2-11) generates an output feature map. The next two levels (h, w) of for-loops (lines 3-11) generate individual pixels of the current output map. The two innermost for-loops (lines 6-9) sum up the pixels in the neighborhood. K is equal to 2 in our LeNet-5 subsampling example in Fig. 19.1. A bias value b[m] that is specific to each output feature map is then added to each output feature map and the sum goes through a sigmoid activation function (Section B.2.1). The reader should recognize that each output pixel is generated by the equivalent of a perceptron (Section B.1) that takes four of the input pixels in each feature map as its input and generates a pixel in the corresponding output feature map. Interested readers should also look into the literature for other types of activation functions. We will focus on the CUDA implementation of the convolution layers in this book since they typically account for the majority of the execution time of CNN training and inference. Interested readers should refer to the literature for the sequential implementations of the Full Connection (i.e., Fully Connected Layer) and the Gaussian Connections Layer in Fig. B.4.
B.5 Summary
This appendix serves as an introduction to machine learning, in order to provide the necessary background for Chapters 19 and 20. It starts with some examples of machine learning tasks. Then, focuses on classifiers and introduces perceptrons, a type of linear classifier that is foundational for understanding modern neural networks, such as convolutional neural networks (CNNs). We discuss how the forward inference and backward propagation training passes are implemented for both single-layer and multi-layer perceptrons. In particular, we discussed the need for differentiable activation functions and how the model parameters can be updated through chain rules in a multi-layer perceptron network during the training process. Based on the conceptual and mathematical understanding of perceptrons, we introduce convolutional neural networks and the sequential implementation of their inference phase and their training phase. In the inference phase, we put the emphasis on the convolutional layers and the subsampling layers, which are common types of layers in CNNs. In the training phase, we focus on the procedure to compute gradients that are necessary to update the weights of the neural network layers in the back-propagation process.
References [1] A.L. Samuel, Some studies in machine learning using the game of checkers, IBM Journal of Research and Development 3 (3) (1959) 210–229. [2] F. Rosenblatt, The Perceptron, a Perceiving and Recognizing Automaton, Tech. Rep. 85460-1, Cornell Aeronautical Laboratory, 1957.
APPENDIX
CUDA memories, address spaces, and pointers C With special contributions from Isaac Gelado and Mark Harris Throughout this book, we have mostly assumed a fairly simple model of interaction between the host and the device in a heterogeneous computing system. In this simple model, as presented in Chapter 2, each device has a device memory (CUDA global memory) that is separate from the host memory, or the system memory. The data to be processed by a kernel running on a device need to be transferred from the host memory to the device memory by calling the cudaMemcpy() function. The data produced by the device also need to be transferred from the device memory to the host by calling the cudaMemcpy() function before it can be utilized by the host. Early GPU generations only supported this simple host/device interaction model. Although the model is simple and easy to understand, it has resulted in several problems at the application level. First, I/O devices such as disk controllers and network interface cards are designed to operate efficiently on the host memory. Since the device memory is separate from the host memory, input data need to be transferred from the host memory to the device memory and output data need to be transferred from the device memory to the host memory for use by I/O devices. Such additional transfers increase the I/O latency and reduce the achievable I/O throughput. For many applications, the ability of I/O devices to operate directly on the device memory would improve overall application performance and simplify the application code. Second, traditional programming systems such as Python place their application data structures in the host memory. Some of the data structures are large. The device memory in CUDA-enabled GPUs tends to offer higher bandwidth but smaller capacity compared to the host memory, which forces application developers to partition their large data structures into chunks that each fit into the device memory. For example, in Chapter 21, the 3D electrostatic energy grid array was partitioned into 2D slices that are transferred between the host memory and the device memory. For many applications, it would be much better if entire data structures can reside in the device memory. For some applications, there may not even be a good way to partition the data structure into smaller chunks. For these applications, it would be best if the GPU can directly access the data in the host memory or have the CUDA runtime system software to migrate the data that are used during kernel execution. As more applications adopted GPU computing, their needs motivated CUDA system software developers and GPU hardware designers to provide a better solution. Researchers have been aware of these needs and have proposed solutions since the early days of CUDA [1]. The rest of this section will go over a brief history of advancements that address these limitations.
References
[3] Y. LeCun, B. Boser, J. Denker, D. Henderson, R. Howard, W. Hubbard, L. Jackel, Handwritten digit recognition with a back-propagation network, Advances in Neural Information Processing Systems 2 (1989). [4] Y. LeCun, L. Bottou, Y. Bengio, P. Haffner, Gradient-based learning applied to document recognition, Proceedings of the IEEE 86 (11) (1998) 2278–2324. [5] G.E. Hinton, S. Osindero, Y.-W. Teh, A fast learning algorithm for deep belief nets, Neural Computation 18 (7) (2006) 1527–1554. [6] R. Raina, A. Madhavan, A.Y. Ng, Large-scale deep unsupervised learning using graphics processors, in: Proceedings of the 26th Annual International Conference on Machine Learning, 2009, pp. 873–880. [7] A. Krizhevsky, I. Sutskever, G.E. Hinton, ImageNet classification with deep convolutional neural networks, Advances in Neural Information Processing Systems 25 (2012). [8] A. Krizhevsky, cuda-convnet, https://code.google.com/p/cuda-convnet/, 2014. [9] D.E. Rumelhart, G.E. Hinton, R.J. Williams, Learning representations by backpropagating errors, Nature 323 (6088) (1986) 533–536.