Batch normalization layer
By introducing a batch normalization layer into the neural network, the problem that neural networks are difficult to deal with changes in input distribution during training is solved, faster training and higher learning rates are achieved, and the dependence on parameter initialization and other regularization technologies is reduced.
Patent Information
- Application Number
- CN202510129979.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2015-01-28
- Filing Date
- 2016-01-28
- Publication Date
- 2025-05-30
AI Technical Summary
Existing neural networks are difficult to effectively handle changes in input distribution during training, resulting in limited learning rate, parameter initialization has a great impact on the training process, and additional regularization techniques are required.
A batch normalization layer is introduced, and the layer is inserted between neural network layers, and each first layer output is normalized by calculating the normalization statistics in the batch, thereby generating a normalized layer output and providing it to the next layer as input.
The training process of neural networks is accelerated, the impact of input distribution changes on training is mitigated, allowing for higher learning rates, and reducing dependence on parameter initialization and other regularization techniques.
Smart Images

Figure CN120068938A_ABST
Abstract
Description
[0001] Division Explanation
[0002] This application is a divisional application of Chinese Patent Application No. 201680012517.X with a filing date of January 28, 2016. Technical Field
[0003] This specification relates to processing an input through a neural network layer to generate an output. Background Art
[0004] A neural network is a machine learning model that uses one or more layers of non - linear units to predict an output for a received input. In addition to the output layer, some neural networks also include one or more hidden layers. The output of each hidden layer is used as the input to the next layer in the network, i.e., the next hidden layer or the output layer. Each layer in the network generates an output from the received input according to the current values of a corresponding set of parameters. Summary of the Invention
[0005] In general, an innovative aspect of the subject matter described in this specification can be embodied as a neural network system implemented by one or more computers. The neural network system includes: a batch normalization layer between a first neural network layer and a second neural network layer. The first neural network layer generates a first - layer output having a plurality of components. The batch normalization layer is configured to, during training of the neural network system based on a batch of training examples: receive the corresponding first - layer output of each training example in the batch; calculate a plurality of normalization statistics for the batch based on the first - layer output; normalize each component of each first - layer output using the normalization statistics to generate a corresponding normalized layer output for each training example in the batch; generate a corresponding batch normalization layer output for each training example from the normalized layer output; and provide the batch normalization layer output as an input to the second neural network layer.
[0006] For a system of one or more computers configured to perform a particular operation or action, it means that the system has software, firmware, hardware, or a combination thereof installed thereon that causes the system to perform the operation or action when operating. For one or more computer programs configured to perform a particular operation or action, it means that the one or more programs include instructions that cause the data - processing device to perform the operation or action when executed.
[0007] Specific embodiments of the subject matter described in this specification can be implemented to achieve one or more of the following advantages. Compared to the same neural network that does not include any batch normalization layers, a neural network system that includes one or more batch normalization layers can be trained more quickly. For example, by including one or more batch normalization layers in a neural network system, problems caused by the distribution of the input to a given layer that changes during training can be alleviated. This can allow for the effective use of higher learning rates during training and can reduce the impact of how the parameters are initialized on the training process. Additionally, during training, the batch normalization layer can act as a regularization matrix and can reduce the need for other regularization techniques (e.g., dropout) employed during training. Once trained, a neural network system that includes a normalization layer can generate a neural network output that is as accurate as, if not more accurate than, the neural network output generated by the same neural network system.
[0008] Details of one or more embodiments of the subject matter of this specification are set forth in the accompanying drawings and the following description. Other features, aspects, and advantages of the subject matter will become apparent from the description, the drawings, and the claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 An example neural network system is shown.
[0010] Figure 2 is a flow diagram of an example process for using a batch normalization layer to process an input during training of a neural network system.
[0011] Figure 3 is a flow diagram of an example process for using batch normalization to process an input after a neural network system has been trained.
[0012] In the various figures, the same reference numbers and signs indicate the same elements. DETAILED DESCRIPTION
[0013] This specification describes a neural network system that includes batch normalization layers, which is implemented as a computer program on one or more computers at one or more locations.
[0014] Figure 1 An example neural network system 100 is shown. The neural network system 100 is an example of a system that is implemented as a computer program on one or more computers at one or more locations, where the systems, components, and techniques described below can be implemented.
[0015] The neural network system 100 includes a plurality of neural network layers arranged in a sequence: arranged in order from the lowest layer to the highest layer in the sequence. The neural network system generates a neural network output from the neural network input by processing the neural network input through each layer in the sequence.
[0016] The neural network system 100 can be configured to receive any kind of digital data input and generate any kind of score or classification output based on that input.
[0017] For example, if the input to the neural network system 100 is an image or features that have been extracted from an image, the output generated by the neural network system 100 for a given image can be scores for each category in an object category set, where each score represents the estimated likelihood that the image contains an object belonging to that category.
[0018] As another example, if the input to the neural network system 100 is an Internet resource (e.g., a web page), a document, or a part of a document, or features extracted from an Internet resource, a document, or a part of a document, the output generated by the neural network system 100 for a given Internet resource, document, or part of a document can be scores for each topic in a topic set, where each score represents the estimated likelihood that the Internet resource, document, or part of a document is related to that topic.
[0019] As another example, if the input to the neural network system 100 is features of a flash scenario of a specific advertisement, the output generated by the neural network system 100 can be a score representing the estimated likelihood of clicking on that specific advertisement.
[0020] As another example, if the input to the neural network system 100 is features of a personalized recommendation for a user, e.g., features characterizing the scenario of the recommendation, e.g., features characterizing actions previously taken by the user, the output generated by the neural network system 100 can be scores for each content item in a content item set, where each score represents the estimated likelihood that the user will respond positively to the recommended content item.
[0021] As another example, if the input to the neural network system 100 is text in one language, the output generated by the neural network system 100 can be scores for each text segment in a set of text segments in another language, where each score represents the estimated likelihood that the text segment in the other language is a suitable translation of the input text into the other language.
[0022] As another example, if the input to the neural network system 100 is a spoken utterance, a sequence of spoken utterances, or features derived from one of the former two, the output generated by the neural network system 100 can be a score for each text segment in a set of text segments, where each score represents an estimated likelihood that the text segment is a correct transcription of the utterance or sequence of utterances.
[0023] As another example, the neural network system 100 can be part of an autocomplete system or part of a text processing system.
[0024] As another example, the neural network system 100 can be part of a reinforcement learning system and can generate an output for selecting an action to be performed by an agent interacting with an environment.
[0025] Specifically, each layer in the neural network is configured to receive an input and generate an output from the input, and the neural network layers jointly process the neural network input received by the neural network system 100 to generate a corresponding neural network output for each received neural network input. Some or all of the neural network layers in the sequence generate an output from the input based on the current values of a set of parameters of the neural network layer. For example, some layers can multiply the received input by a matrix of current parameter values as part of generating an output from the received input.
[0026] The neural network system 100 further includes a batch normalization layer 108, which is between the neural network layer A 104 and the neural network layer B 112 in the sequence of neural network layers. The batch normalization layer 108 is configured to: during the training of the neural network system 100, perform a set of operations on the input received from the neural network layer A 104, and, after the neural network system 100 has been trained, perform another set of operations on the input received from the neural network layer A 104.
[0027] Specifically, the neural network system 100 can be trained based on multiple batches of training examples to determine the training values of the parameters of the neural network layers. A batch of training examples is a set of multiple training examples. For example, during training, the neural network system 100 can process a batch of training examples 102 and generate a corresponding neural network output for each training example in the batch 102. Then, the neural network output is used to adjust the values of the parameters of the neural network layers in the sequence, for example, by traditional gradient descent and backpropagation neural network training techniques.
[0028] During training of the neural network system 100 on a given batch of training examples, the batch normalization layer 108 is configured to receive the layer A output 106 generated by the neural network layer A 104 for the training examples in the batch, process the layer A output 106 to generate a corresponding batch normalization layer output 110 for each training example in the batch, and then provide the batch normalization layer output 110 as an input to the neural network layer B 112. The layer A output 106 includes corresponding outputs generated by the neural network layer A 104 for each training example in the batch. Similarly, the batch normalization layer output 110 includes corresponding outputs generated by the batch normalization layer 108 for each training example in the batch.
[0029] Typically, the batch normalization layer 108 calculates a set of normalization statistics for the batch based on the layer A output 106, normalizes the layer A output 106 to generate a corresponding normalized output for each training example in the batch, and, optionally, transforms each of the normalized outputs before providing the output as an input to the neural network layer B 112.
[0030] The normalization statistics calculated by the batch normalization layer 108 and the manner in which the batch normalization layer 108 normalizes the layer A output 106 during training depend on the nature of the neural network layer A 104 that generates the layer A output 106.
[0031] In some cases, the neural network layer A 104 is a layer that generates an output that includes multiple components indexed by dimensions. For example, the neural network layer A 104 can be a fully connected neural network layer. However, in some other cases, the neural network layer A 104 is a convolutional layer or other kind of neural network layer that generates an output that includes multiple components indexed by both feature indices and spatial positions. Below will refer to Figure 2 describe in more detail the generation of the batch normalization layer output during training of the neural network system 100 in each of these two cases.
[0032] Once the neural network system 100 has been trained, the neural network system 100 can receive a new neural network input for processing and process the neural network input through the neural network layers to generate a new neural network output for the input according to the trained values of the parameters of the components of the neural network system 100. The operations performed by the batch normalization layer 108 during processing of the new neural network input also depend on the nature of the neural network layer A 104. Below will refer to Figure 3 describe in more detail the processing of the new neural network input after the neural network system 100 has been trained.
[0033] The batch normalization layer 108 can be included at various positions in the sequence of neural network layers, and in some embodiments, multiple batch normalization layers can be included in the sequence.
[0034] In Figure 1 the example of, in some embodiments, the neural network layer A 104 generates an output by modifying the input to the layer according to the current value of the parameter set of the first neural network layer (e.g., by multiplying the input to the layer by a matrix of the current parameter values). In these embodiments, the neural network layer B 112 can receive the output from the batch normalization layer 108 and generate an output by applying a non-linear operation (i.e., a non-linear activation function) to the output of the batch normalization layer. Thus, in these embodiments, the batch normalization layer 108 is inserted within the traditional neural network layer, and the operation of the traditional neural network layer is divided between the neural network layer A 104 and the neural network layer B 112.
[0035] In some other embodiments, the neural network layer A 104 generates an output by modifying the layer input according to the current value of the parameter set to generate a modified first layer input and then applying a non-linear operation to the modified first layer input before providing the output to the batch normalization layer 108. Thus, in these embodiments, the batch normalization layer 108 is inserted after the traditional neural network layer in the sequence.
[0036] Figure 2 is a flowchart of an example process 200 for generating the output of the batch normalization layer during the training of a neural network based on a batch of training examples. For convenience, the process 200 is described as being executed by a system of one or more computers located at one or more locations. For example, a batch normalization layer included in a neural network system (e.g., the batch normalization layer 108 included in Figure 1 the neural network system 100 of
[0037] The batch normalization layer receives the lower layer output of the batch of training examples (step 202). The lower layer output includes the respective outputs generated by the layer below the batch normalization layer in the sequence of neural network layers for each training example in the batch.
[0038] The batch normalization layer generates the respective normalized outputs for each training example in the batch (step 204). That is, the batch normalization layer generates the respective normalized outputs from each received lower layer output.
[0039] In some cases, the layer below the batch normalization layer is a layer that generates an output that includes multiple components indexed by dimension.
[0040] In these cases, the batch normalization layer computes the mean and standard deviation of the components of the lower layer output corresponding to each dimension for each dimension. The batch normalization layer then normalizes each component of each lower layer output in the lower layer output using the mean and standard deviation to generate the corresponding normalized output for each training example in the batch. Specifically, for a given component of a given output, the batch normalization layer normalizes the component using the mean and standard deviation computed for the dimension corresponding to the component. For example, in some embodiments, for the component x corresponding to the k-th dimension of the i-th lower layer output from batch β k,i , the normalized output satisfies:
[0041]
[0042] where μ Β is the mean of the components corresponding to the k-th dimension of the lower layer output in batch β, and σ B is the standard deviation of the components corresponding to the k-th dimension of the lower layer output in batch β. In some embodiments, the standard deviation is a numerically stable standard deviation equal to (σ B 2 + ε) 1 / 2 , where ε is a constant value, and σ B 2 is the variance of the components corresponding to the k-th dimension of the lower layer output in batch β.
[0043] However, in some other cases, the neural network layer below the batch normalization layer is a convolutional layer or other types of neural network layers, and the other types of neural network layers generate an output including multiple components indexed by both a feature index and a spatial location index respectively.
[0044] In some of these cases, the batch normalization layer computes the mean and variance of the components of the lower layer output having the feature index and the spatial location index for each possible combination of the feature index and the spatial location index. The batch normalization layer then computes the average of the means of the feature index and spatial location index combinations including the feature index for each feature index. The batch normalization layer also computes the average of the variances of the feature index and spatial location index combinations including the feature index for each feature index. Thus, after computing the averages, the batch normalization layer has computed the mean statistic for each feature across all spatial locations and the variance statistic for each feature across all spatial locations.
[0045] The batch normalization layer then normalizes each component of each lower layer output in the lower layer outputs using the mean of the means and the variance of the means to generate a corresponding normalized output for each training example in the batch. Specifically, for a given component of a given output, the batch normalization layer uses the mean of the means and the variance of the means corresponding to the feature index of the component (e.g., in the same manner as described above for the layer below the batch normalization layer generating outputs indexed by dimension) to normalize the component.
[0046] In other of these cases, the batch normalization layer calculates the mean and variance of the components of the lower layer output corresponding to the feature index for each feature index (i.e., the lower layer output having that feature index).
[0047] The batch normalization layer then normalizes each component of each lower layer output in the lower layer outputs using the mean and variance of the feature index to generate a corresponding normalized output for each training example in the batch. Specifically, for a given component of a given output, the batch normalization layer then uses the mean and variance of the feature index corresponding to the component (e.g., in the same manner as described above for the layer below the batch normalization layer generating outputs indexed by dimension) to normalize the component.
[0048] Optionally, the batch normalization layer transforms each component of each normalized output (step 206).
[0049] In the case where the layer below the batch normalization layer is a layer that generates an output including a plurality of components indexed by dimension, the batch normalization layer transforms each component of each normalized output in that dimension according to the current value of the parameter set for that dimension. That is, the batch normalization layer maintains a corresponding parameter set for each dimension and uses these parameters to apply the transformation to the components of the normalized output in that dimension. The values of the parameter set are adjusted as part of the training of the neural network system. For example, in some embodiments, the transformed normalized output y generated from the normalized output k,i satisfies:
[0050]
[0051] where γ k and A k are parameters for the k-th dimension.
[0052] When the layer below the batch normalization layer is a convolutional layer, the batch normalization layer transforms each component of each normalized output in the normalized output according to the current value of the parameter set corresponding to the feature index of that component. That is, the batch normalization layer maintains a corresponding parameter set for each feature index and uses these parameters to apply the transformation to the components of the normalized output with the feature index, for example, in the same manner as described above when the layer below the batch normalization layer generates an output indexed by dimension. The value of the parameter set is adjusted as part of the training of the neural network system.
[0053] The batch normalization layer provides the normalized output or the transformed normalized output as the input to the layer above the batch normalization layer in the sequence (step 208).
[0054] After the neural network has generated the neural network output for the training examples in the batch, the normalization statistics are backpropagated as part of adjusting the values of the parameters of the neural network, that is, as part of performing the backpropagation training technique.
[0055] Figure 3 is a flowchart of an example process 300 for generating the output of the batch normalization layer for a new neural network input after the neural network has been trained. For convenience, process 300 is described as being executed by a system of one or more computers located in one or more locations. For example, the batch normalization layer included in a neural network system (e.g., the batch normalization layer 108 in the neural network system 100 included in Figure 1 can be programmed appropriately to execute process 300.
[0056] The batch normalization layer receives the output of the lower layer of the new neural network input (step 302). The lower layer output is the output generated by the layer below the batch normalization layer in the neural network layer sequence for the new neural network input.
[0057] The batch normalization layer generates a normalized output of the new neural network input (step 304).
[0058] If the output generated by the layer below the batch normalization layer is indexed by dimension, the batch normalization layer normalizes each component in the lower layer output using the pre-computed mean and standard deviation for each dimension in the dimension to generate the normalized output. In some cases, the mean and standard deviation for a given dimension are calculated from the components in the dimension of all outputs generated by the layer below the batch normalization layer during the training of the neural network system.
[0059] However, in some other cases, the mean and standard deviation for a given dimension are calculated based on components in the dimensions of the lower layer outputs generated by the layers below the batch normalization layer after training (e.g., based on the lower layer outputs generated during a most recent time window of a specified duration or from a specified number of the most recently generated lower layer outputs by the layers below the batch normalization layer).
[0060] Specifically, in some cases, the distribution of the network inputs can change between the training examples used during training and the new neural network inputs used after the neural network system has been trained. Thus, the distribution of the lower layer outputs can change between them. For example, if the new neural network inputs are of a different type than the training examples. For instance, a neural network system has been trained based on user images and can now be used to process video frames. The user images and video frames may have different distributions in terms of the classes pictured, image attributes, composition, etc. Thus, using the statistics from training to normalize the lower layer inputs may not accurately capture the statistics of the lower layer outputs generated for the new inputs. Therefore, in these cases, the batch normalization layer can use the normalization statistics calculated from the lower layer outputs generated by the layers below the batch normalization layer after training.
[0061] If the outputs generated by the layers below the batch normalization layer are indexed by feature index and spatial location index, the batch normalization layer normalizes each component of the lower layer outputs using the pre - calculated mean of means and mean of variances for each feature index in the feature index to generate the normalized outputs. In some cases, as described above, the mean of means and mean of variances for a given feature index are calculated based on the outputs generated by the layers below the batch normalization layer for all training examples used during training. In some other cases, as described above, the mean and standard deviation for a given feature index are calculated based on the lower layer outputs generated by the layers below the batch normalization layer after training.
[0062] Optionally, the batch normalization layer transforms each component of the normalized output (step 306).
[0063] If the output generated by the layer below the batch normalization layer is indexed by dimension, the batch normalization layer transforms the components of the normalized output in each dimension according to the training values of the parameter set for that dimension. If the output generated by the layer below the batch normalization layer is indexed by feature index and spatial location index, the batch normalization layer transforms each component of the normalized output according to the training values of the parameter set corresponding to the feature index of the component. The batch normalization layer provides the normalized output or the transformed normalized output as the input to the layer above the batch normalization layer in the sequence (step 308).
[0064] Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, in tangibly embodied computer software or firmware, in computer hardware including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible non-transitory program carrier for execution by, or to control the operation of, data processing apparatus. Alternatively or additionally, the program instructions can be encoded on an artificially generated propagated signal (e.g., a machine-generated electrical, optical, or electromagnetic signal) that is generated to encode information for transmission to a suitable receiver apparatus for execution by the data processing apparatus. A computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.
[0065] The term “data processing apparatus” encompasses all kinds of apparatus, devices, and machines for processing data, including, for example, programmable processors, computers, or multiple processors or computers. The apparatus can include special purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). In addition to hardware, the apparatus can also include code that creates an execution environment for the computer programs being discussed, such as code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.
[0066] A computer program (which may also be referred to or described as a program, software, software application, module, software module, script, or code) can be written in any form of programming language (including compiled or interpreted languages, declarative or procedural languages), and the computer program can be deployed in any form (including as a stand-alone program or as a module, component, subroutine, or other unit suitable for a computing environment). A computer program may or may not correspond to a file in a file system. The program can be stored in a part of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), stored in a single file dedicated to the program in question or in multiple co-operating files (e.g., files that store one or more modules, subroutines, or portions of code). The computer program can be deployed to execute on one computer or multiple computers located at one site or distributed across multiple sites and interconnected by a communication network.
[0067] The processes and logical flows described in this specification can be performed by one or more programmable computers that execute one or more computer programs to perform functions by operating on input data and generating output. The processes and logical flows can also be performed by special purpose logic circuitry, e.g., an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit), and the apparatus can also be implemented as special purpose logic circuitry.
[0068] A computer suitable for executing a computer program can be, for example, based on a general or a special purpose microprocessor or both, or any other kind of central processing unit. Generally speaking, the central processing unit will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a central processing unit for performing or executing instructions and one or more memory devices for storing the instructions and data. Generally speaking, a computer also includes one or more mass storage devices (e.g., magnetic disks, magneto-optical disks, or optical disks) for storing data, or can be operatively coupled to receive data from the mass storage device or transfer data to the mass storage device or do both. However, a computer need not have such devices. In addition, a computer may be embedded in another device, e.g., a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device (e.g., a universal serial bus (USB) flash drive), to name just a few. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including: for example, semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, CD-ROM disks, and DVD-ROM disks. The processor and the memory may be supplemented by, or incorporated in, special purpose logic circuitry.
[0069] To provide for interaction with a user, embodiments of the subject matter described in this specification may be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user, a keyboard, and a pointing device (such as a mouse or a trackball), by which the user may provide input to the computer. Other kinds of devices may also be used to provide for interaction with the user; for example, feedback provided to the user may be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and input from the user may be received in any form, including acoustic, speech, or tactile input. Additionally, a computer may interact with the user by sending documents to and receiving documents from the device used by the user (e.g., by sending a web page to a web browser on a client device of the user in response to a request received from the web browser).
[0070] Embodiments of the subject matter described in this specification can be implemented in a computing system that includes a backend component (e.g., as a data server), or includes a middleware component (e.g., an application server), or includes a frontend component (e.g., a client computer having a graphical user interface or a web browser through which a user can interact with an implementation of the subject matter described in this specification), or the computing system includes any combination of one or more such backend, middleware, or frontend components. The components of the system can be interconnected by any form of digital data communication medium, such as a communication network. Examples of communication networks include local area networks (“LANs”) and wide area networks (“WANs”), such as the Internet.
[0071] A computing system can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship between a client and a server arises from computer programs that run on respective computers and have a client-server relationship with each other.
[0072] Although this specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or of what may be claimed, but rather as descriptions of features specific to particular embodiments of a particular invention. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination in multiple embodiments. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, in some cases one or more features from a claimed combination can be excluded from the combination, and the claimed combination can be directed to a sub-combination or a variant of a sub-combination.
[0073] Likewise, although operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed to achieve a desired result. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the above embodiments should not be understood as required in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0074] Specific embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the acts recited in the claims can be performed in a different order and still achieve the desired result. As one example, the processes illustrated in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing may be beneficial.
Claims
1. A system, the system comprises: a user computer; and a computer system, the computer system comprising one or more computers and one or more storage devices storing instructions which, when executed by the one or more computers, cause the one or more computers to perform operations, the operations comprising: receiving a network input from the user computer comprising an image or image features of the image; processing the network input using a convolutional neural network, the convolutional neural network being configured to receive the network input and generate a network output characterizing the image, wherein: the neural network comprises a first neural network layer and a second neural network layer, processing the network input using the neural network comprises processing a first layer input to the first neural network layer according to training values of a parameter set of the first neural network layer to generate a first layer output having a plurality of components, the training values of the parameter set of the first neural network layer are a result of training the neural network using a plurality of training data batches, each training data batch comprises a corresponding plurality of training examples, and training the neural network to determine the training values of the parameter set of the first neural network layer comprises, for each of the plurality of batches: receiving corresponding first layer outputs generated by the first neural network layer for each of the plurality of training examples in the batch; calculating a plurality of normalized statistics for the batch based on the first layer outputs, comprising: for each of a plurality of subsets of the plurality of components of the first layer output, determining an average value of the components of the first layer output of each of the plurality of training examples in the batch that are located in the corresponding subset, and for each of the plurality of subsets of the plurality of components of the first layer output, determining a standard deviation of the components of the first layer output of each of the plurality of training examples in the batch that are located in the corresponding subset; generating a corresponding batch normalization layer output for each training example in the batch, comprising: for each first layer output and for each of the plurality of subsets, normalizing the components of the first layer output that are located in the corresponding subset using the average value of the corresponding subset and the standard deviation of the corresponding subset; and generating a corresponding batch normalization layer output for each of the training examples based on the normalized layer outputs; and providing the corresponding batch normalization layer output as an input to the second neural network layer; and providing the network output as an output of the computing system.
2. The system according to claim 1, wherein training the neural network to determine the training values of the parameter set of the first neural network layer further comprises, for each of the plurality of batches: generating a corresponding network output for each training example, including processing the corresponding batch normalization layer output using the second neural network layer; and Updating the set of parameters of the first neural network layer using the corresponding network output with backpropagation techniques.
3. The system according to claim 2, wherein, updating the set of parameters of the first neural network layer using the corresponding network output with backpropagation techniques includes: Backpropagating through the normalization statistics.
4. The system according to claim 1, wherein, the multiple components of the first layer output are indexed by a dimension index, and wherein calculating multiple normalization statistics for the first layer output includes: For each dimension in the dimension, calculating the mean of the components of the first layer output in the dimension; and For each dimension in the dimension, calculating the standard deviation of the components of the first layer output in the dimension.
5. The system according to claim 4, wherein, normalizing each component among the multiple components of each first layer output includes: Normalizing the component using the calculated mean and the calculated standard deviation for the dimension corresponding to the component.
6. The system according to claim 4, wherein, generating the corresponding batch normalization layer output for each training example in the training examples according to the normalization layer output includes: For each dimension, transforming the components of the normalization layer output of the training examples in the dimension according to the current value of the parameter set for the dimension.
7. The system according to claim 1, wherein, the first neural network layer is a convolutional layer, wherein the multiple components of the first layer output are indexed by a feature index and a spatial position index, and wherein calculating multiple normalization statistics for the first layer output includes, for each feature index in the feature index: Calculating the mean of the components of the first layer output corresponding to the feature index; and Calculating the variance of the components of the first layer output corresponding to the feature index.
8. The system according to claim 7, wherein, normalizing each component among the multiple components of each layer output includes: Normalizing the component using the mean and the variance for the feature index corresponding to the component.
9. The system according to claim 7, wherein, generating the corresponding batch normalization layer output for each training example in the training examples from the normalization layer output includes: Transforming the component according to the current value of the parameter set of the feature index corresponding to each component of the multiple components of the normalization layer output.
10. One or more non - transitory computer - readable storage media storing instructions which, when executed by one or more computers, cause the one or more computers to perform operations, the operations including: Receiving a network input including an image or image features of the image from the user computer; Processing the network input using a convolutional neural network, the convolutional neural network being configured to receive the network input and generate a network output characterizing the image, wherein: The neural network includes a first neural network layer and a second neural network layer, processing the network input using the neural network includes processing a first layer input to the first neural network layer according to a training value of a parameter set of the first neural network layer to generate a first layer output having a plurality of components, the training value of the parameter set of the first neural network layer is a result of training the neural network using a plurality of training data batches, each training data batch includes a corresponding plurality of training examples, and training the neural network to determine the training value of the parameter set of the first neural network layer includes, for each of the plurality of batches: receiving a corresponding first layer output generated by the first neural network layer for each of the plurality of training examples in the batch; calculating a plurality of normalization statistics for the batch based on the first layer output, including: for each of a plurality of subsets of the plurality of components of the first layer output, determining an average value of the components of the first layer output of each of the plurality of training examples in the batch that are located in the corresponding subset, and for each of the plurality of subsets of the plurality of components of the first layer output, determining a standard deviation of the components of the first layer output of each of the plurality of training examples in the batch that are located in the corresponding subset; generating a corresponding batch normalization layer output for each training example in the batch, including: for each first layer output and for each of the plurality of subsets, normalizing the components of the first layer output that are located in the corresponding subset using the average value of the corresponding subset and the standard deviation of the corresponding subset; and generating a corresponding batch normalization layer output for each of the training examples based on the normalized layer output; and providing the corresponding batch normalization layer output as an input to the second neural network layer; and providing the network output as an output of the one or more computers.
11. The non-transitory computer-readable storage medium according to claim 10, wherein, training the neural network to determine the training value of the parameter set of the first neural network layer further includes, for each of the plurality of batches: generating a corresponding network output for each training example, including processing the corresponding batch normalization layer output using the second neural network layer; and updating the parameter set of the first neural network layer using the corresponding network output using backpropagation techniques.
12. The non-transitory computer-readable storage medium according to claim 11, wherein, updating the parameter set of the first neural network layer using the corresponding network output using backpropagation techniques includes: backpropagating through the normalization statistics.
13. The non-transitory computer-readable storage medium according to claim 12, wherein, The multiple components output by the first layer are indexed by dimension, and wherein calculating multiple normalization statistics for the first layer output includes: For each dimension in the dimension, calculating the mean of the components of the first layer output in the dimension; and For each dimension in the dimension, calculating the standard deviation of the components of the first layer output in the dimension.
14. The non-transitory computer-readable storage medium according to claim 13, wherein, Normalizing each component among the multiple components of each first layer output includes: Normalizing the component using the calculated mean and the calculated standard deviation for the dimension corresponding to the component.
15. The non-transitory computer-readable storage medium according to claim 11, wherein, The first neural network layer is a convolutional layer, wherein the multiple components of the first layer output are indexed by feature index and spatial position index, and wherein calculating multiple normalization statistics for the first layer output includes, for each feature index among the feature indexes: Calculating the mean of the components of the first layer output corresponding to the feature index; and Calculating the variance of the components of the first layer output corresponding to the feature index.
16. The non-transitory computer-readable storage medium according to claim 15, wherein, Normalizing each component among the multiple components of each layer output includes: Normalizing the component using the mean and the variance for the feature index corresponding to the component.
17. The non-transitory computer-readable storage medium according to claim 15, wherein, Generating the corresponding batch normalization layer output for each training example in the training examples from the normalization layer output includes: Transforming the component according to the current value of the parameter set of the feature index corresponding to each component among the multiple components of the normalization layer output.
18. A method performed by one or more computers, the method comprises: Receiving, from the user computer, a network input including an image or image features of the image; Processing the network input using a convolutional neural network configured to receive the network input and generate a network output representing the image, wherein: The neural network includes a first neural network layer and a second neural network layer, Processing the network input using the neural network includes processing a first layer input to the first neural network layer according to a training value of a parameter set of the first neural network layer to generate a first layer output having multiple components, The training value of the parameter set of the first neural network layer is a result of training the neural network using multiple training data batches, Each training data batch includes a corresponding plurality of training examples, and Training the neural network to determine the training value of the parameter set of the first neural network layer includes, for each of the multiple batches: Receive the respective first-layer outputs generated by the first neural network layer for each of the plurality of training examples in the batch; Calculate a plurality of normalization statistics for the batch based on the first-layer outputs, including: For each subset of a plurality of subsets of the plurality of components of the first-layer outputs, determine the mean of the components of the first-layer outputs of each of the plurality of training examples in the batch that are located in the respective subset, and For each subset of the plurality of subsets of the plurality of components of the first-layer outputs, determine the standard deviation of the components of the first-layer outputs of each of the plurality of training examples in the batch that are located in the respective subset; For each training example in the batch, generate a respective batch normalization layer output, including: For each first-layer output and for each subset of the plurality of subsets, normalize the components of the first-layer output that are located in the respective subset using the mean of the respective subset and the standard deviation of the respective subset; and Generate a respective batch normalization layer output for each of the training examples based on the normalized layer outputs; and Provide the respective batch normalization layer outputs as an input to the second neural network layer; and Provide the network output as the output of the computing system.
19. The method according to claim 18, wherein, Training the neural network to determine the training values of the parameter set of the first neural network layer further includes, for each of the plurality of batches: Generating a respective network output for each training example, including processing the respective batch normalization layer output using the second neural network layer; and Updating the parameter set of the first neural network layer using the respective network output using backpropagation techniques.
20. The method according to claim 19, wherein, Updating the parameter set of the first neural network layer using the respective network output using backpropagation techniques includes: Backpropagating through the normalization statistics.
21. A system, the system comprising: A user computer; and A computer system, the computer system including one or more computers and one or more storage devices storing instructions that, when executed by the one or more computers, cause the one or more computers to perform operations, the operations including: Receiving a neural network input from the user computer; Generating a neural network output for the neural network input by processing the neural network input using a neural network system that has been trained on training data, wherein: The neural network system includes a sequence of neural network layers, wherein the sequence includes a batch normalization layer between a first neural network layer and a second neural network layer in the sequence of neural network layers of the neural network system, The neural network system generates the neural network output from the neural network input by processing the neural network input through each layer in the sequence, and The batch normalization layer is configured to, after the neural network system has been trained: Receive the output generated by the first neural network layer for the neural network input; Generate a normalized output for the neural network input; and Provide the normalized output or a transformed version of the normalized output as an input to the second neural network layer; and wherein, i) The output generated by the first neural network layer is indexed by dimension, and the batch normalization layer is configured to normalize each component of the first neural network layer output using pre-computed means and standard deviations for each dimension in the dimension to generate the normalized output; or ii) The output generated by the first neural network layer is indexed by feature index and spatial location index, and the batch normalization layer is configured to normalize each component of the first neural network layer output using pre-computed mean means and mean variances for each feature index in the feature index to generate the normalized output; and Provide the network output as the output of the computer system.
22. The system according to claim 21, wherein, The output generated by the first neural network layer is indexed by dimension, and the batch normalization layer is configured to normalize each component of the first neural network layer output using pre-computed means and standard deviations for each dimension in the dimension to generate the normalized output, wherein the pre-computed means and standard deviations for a given dimension are calculated based on the components in the dimension of the output generated by the first neural network layer after training.
23. The system according to claim 21, wherein, The output generated by the first neural network layer is indexed by dimension, and the batch normalization layer is configured to normalize each component of the first neural network layer output using pre-computed means and standard deviations for each dimension in the dimension to generate the normalized output, wherein the pre-computed means and standard deviations for a given dimension are calculated based on the components in the dimension of the output generated by the first neural network layer during training.
24. The system according to claim 21, wherein, The output generated by the first neural network layer is indexed by feature index and spatial location index, and the batch normalization layer is configured to normalize each component of the first neural network layer output using pre-computed mean means and mean variances for each feature index in the feature index to generate the normalized output, and wherein the pre-computed means and standard deviations for a given feature index are calculated based on the output generated by the first neural network layer after training.
25. The system according to claim 21, wherein, The output generated by the first neural network layer is indexed by a feature index and a spatial location index, and the batch normalization layer is configured to normalize each component of the first neural network layer output using a mean of pre-computed means and a variance of the means for each feature index in the feature index to generate the normalized output, and wherein the pre-computed means and standard deviations for a given feature index are computed based on the output generated by the first neural network layer for training examples used during training.
26. The system according to claim 21, wherein, the batch normalization layer is configured to transform each component of the normalized output to provide the transformed version of the normalized output for input to the second neural network layer.
27. The system according to claim 21, wherein, the neural network input includes one or more of an image, text, or audio, and the network output includes a classification output based on the neural network input.
28. The system according to claim 21, wherein, the neural network input includes one or more of an image, text, or audio, and the network output includes one or more scores of the neural network input.
29. A system, the system comprising: a user computer; and a computer system comprising one or more computers and one or more storage devices storing instructions that, when executed by the one or more computers, cause the one or more computers to perform operations, the operations including: receiving a neural network input from the user computer; processing the neural network input using a neural network configured to receive the neural network input and generate a network output, wherein: the neural network includes a first neural network layer and a second neural network layer, processing the network input using the neural network includes processing a first layer input to the first neural network layer according to training values of a parameter set of the first neural network layer to generate a first layer output having a plurality of components, the training values of the parameter set of the first neural network layer are the result of training the neural network using a plurality of training data batches, each training data batch includes a corresponding plurality of training examples, and training the neural network to determine the training values of the parameter set of the first neural network layer includes, for each of the plurality of batches: receiving a corresponding first layer output generated by the first neural network layer for each of the plurality of training examples in the batch; computing a plurality of normalization statistics for the batch based on the first layer output, including: for each of a plurality of subsets of the plurality of components of the first layer output, determining the mean of the components of the first layer output of each of the plurality of training examples in the batch that are located in the corresponding subset, and For each subset of the plurality of subsets of the plurality of components output by the first layer, determine the standard deviation of the components of the output of the first layer of each training example in the batch that are located in the corresponding subset; For each training example in the batch, generate a corresponding batch normalization layer output, including: For each output of the first layer and for each subset of the plurality of subsets, normalize the components of the output of the first layer that are located in the corresponding subset using the mean of the corresponding subset and the standard deviation of the corresponding subset; and Generate a corresponding batch normalization layer output for each training example in the training examples according to the normalization layer output; and Provide the corresponding batch normalization layer output as an input to the second neural network layer; and Provide the network output as the output of the computing system.
30. The system according to claim 29, wherein, Training the neural network to determine the training values of the parameter set of the first neural network layer further includes, for each of the plurality of batches: Generate a corresponding network output for each training example, including processing the corresponding batch normalization layer output using the second neural network layer; and Use backpropagation techniques to update the parameter set of the first neural network layer using the corresponding network output.
31. The system according to claim 30, wherein, Using backpropagation techniques to update the parameter set of the first neural network layer using the corresponding network output includes: Backpropagating through the normalization statistics.
32. The system according to claim 29, wherein, The plurality of components of the output of the first layer are indexed by dimension, and wherein calculating a plurality of normalization statistics for the output of the first layer includes: For each dimension, calculate the mean of the components of the output of the first layer in the dimension; and For each dimension, calculate the standard deviation of the components of the output of the first layer in the dimension.
33. The system according to claim 32, wherein, Normalizing each component of the plurality of components of each output of the first layer includes: Normalize the component using the calculated mean and the calculated standard deviation for the dimension corresponding to the component.
34. The system according to claim 32, wherein, Generating the corresponding batch normalization layer output for each training example in the training examples according to the normalization layer output includes: For each dimension, transform the components of the normalization layer output of the training example in the dimension according to the current value of the parameter set for the dimension.
35. The system according to claim 29, wherein, The first neural network layer is a convolutional layer, wherein the multiple components output by the first layer are indexed by a feature index and a spatial location index, and wherein calculating a plurality of normalized statistics for the output of the first layer includes, for each feature index in the feature index: calculating an average value of the components of the output of the first layer corresponding to the feature index; and calculating a variance of the components of the output of the first layer corresponding to the feature index.
36. The system according to claim 35, wherein, normalizing each component among the multiple components output by each layer includes: normalizing the component using the average value and the variance for the feature index corresponding to the component.
37. The system according to claim 35, wherein, generating the corresponding batch normalization layer output for each training example in the training examples from the normalization layer output includes: transforming the component according to the current value of the parameter set for the feature index corresponding to each component among the multiple components of the normalization layer output.
38. The system according to claim 29, wherein, the neural network input includes one or more of an image, text, or audio, and the network output includes a classification output based on the neural network input.
39. The system according to claim 29, wherein, the neural network input includes one or more of an image, text, or audio, and the network output includes one or more scores of the neural network input.
40. One or more non-transitory computer-readable storage media storing instructions that, when executed by one or more computers, cause the one or more computers to perform operations, the operations include: receiving a neural network input from a user computer; generating a neural network output for the neural network input by processing the neural network input using a neural network system that has been trained on training data, wherein: the neural network system includes a sequence of neural network layers, wherein the sequence includes a batch normalization layer between a first neural network layer and a second neural network layer in the sequence of neural network layers of the neural network system, the neural network system generates the neural network output from the neural network input by processing the neural network input through each layer in the sequence, and the batch normalization layer is configured to, after the neural network system has been trained: receive the output generated by the first neural network layer for the neural network input; generate a normalized output for the neural network input; and provide the normalized output or a transformed version of the normalized output as an input to the second neural network layer; and wherein, i) the output generated by the first neural network layer is indexed by dimension, and the batch normalization layer is configured to normalize each component of the output of the first neural network layer using pre-computed average values and standard deviations for each dimension in the dimension to generate the normalized output; or ii) The output generated by the first neural network layer is indexed by a feature index and a spatial location index, and the batch normalization layer is configured to normalize each component of the output of the first neural network layer using the mean of the pre-computed means and the variance of the means for each feature index in the feature index to generate the normalized output; and Provide the network output as the output of the one or more computers.
41. An image classification neural network system for classifying images and implemented by one or more computers, the image classification neural network system comprises: A convolutional neural network configured to receive a network input including an image or image features of the image and generate a network output including corresponding scores for each object category in a set of object categories, the score for each object category representing the likelihood that the image contains an image of an object belonging to the object category, and the convolutional neural network comprising: A plurality of neural network layers, the plurality of neural network layers including a first convolutional neural network layer and a second neural network layer; and A batch normalization layer between the first convolutional neural network layer and the second neural network layer, wherein the first convolutional neural network layer generates a first layer output having a plurality of components, the plurality of components being indexed by a feature index and a spatial location index, and wherein the batch normalization layer is configured to, during training of the convolutional neural network on a batch of training examples: Receive the corresponding first layer output of each training example in the batch; Calculate a plurality of normalization statistics for the batch based on the first layer output, wherein calculating the plurality of normalization statistics for the first layer output includes, for each feature index in the feature index: Calculating the mean of the components of the first layer output corresponding to the feature index; and Calculating the variance of the components of the first layer output corresponding to the feature index; Normalize each component of each first layer output using the normalization statistics to generate a corresponding normalized layer output for each training example in the batch; Generate a corresponding batch normalization layer output for each training example in the training examples from the normalized layer output; and Provide the batch normalization layer output as an input to the second neural network layer.
42. The image classification neural network system according to claim 41, wherein, Normalizing each component of each layer output includes: Normalizing the component using the mean and the variance of the feature index corresponding to the component.
43. The image classification neural network system according to claim 41, wherein, Generating the corresponding batch normalization layer output for each training example in the training examples from the normalized layer output includes: Transforming the component according to the current value of the parameter set of the feature index corresponding to each component of the normalized layer output.
44. The image classification neural network system according to claim 43, wherein, The batch normalization layer is configured to, after the neural network has been trained to determine training values of parameters for each feature index in the feature indices: Receive a new first layer input generated from a new neural network input; Normalize each component of the new first layer output using pre-computed mean and standard deviation statistics for the feature index to generate a new normalized layer output; Generate a new batch normalization layer output by transforming each component according to the training value of the parameter set of the feature index corresponding to each component of the normalized layer output; And Provide the new batch normalization layer output as a new layer input to the second neural network layer.
45. The image classification neural network system according to claim 41, Wherein, The first convolutional neural network layer generates the first layer output by applying a convolution to the first layer input according to the current value of the parameter set of the first convolutional neural network layer.
46. The image classification neural network system according to claim 45, Wherein, The second neural network layer generates a second layer output by applying a non-linear operation to the batch normalization layer output.
47. The image classification neural network system according to claim 41, Wherein, The first neural network layer generates the first layer output by applying a convolution to the first layer input according to the current value of the parameter set of the first convolutional neural network layer to generate a modified first layer input and then applying a non-linear operation to the modified first layer input.
48. The image classification neural network system according to claim 41, Wherein, During the training of the neural network, the neural network system is configured to backpropagate the normalization statistics as part of adjusting the parameter values of the neural network.
49. One or more non-transitory computer-readable storage media storing instructions that, when executed by one or more computers, cause the one or more computers to implement an image classification neural network system for classifying images, the image classification neural network system Comprises: A convolutional neural network configured to receive a network input comprising an image or image features of the image and generate a network output comprising corresponding scores for each object category in a set of object categories, the score for each object category representing the likelihood that the image contains an object belonging to the category, the convolutional neural network comprising: A plurality of neural network layers, the plurality of neural network layers including a first convolutional neural network layer and a second neural network layer; and A batch normalization layer between the first convolutional neural network layer and the second neural network layer, wherein the first convolutional neural network layer generates a first layer output having a plurality of components indexed by a feature index and a spatial position index, and wherein the batch normalization layer is configured to, during training of the convolutional neural network on a batch of training examples: Receive the corresponding first layer output of each training example in the batch; Calculate a plurality of normalized statistics for the batch based on the output of the first layer, where calculating the plurality of normalized statistics for the output of the first layer includes, for each feature index in the feature index: Calculate the mean of the components of the output of the first layer corresponding to the feature index; and Calculate the variance of the components of the output of the first layer corresponding to the feature index; Normalize each component of each output of the first layer using the normalized statistics to generate a corresponding normalized layer output for each training example in the batch; Generate a corresponding batch-normalized layer output for each training example in the training examples from the normalized layer output; and Provide the batch-normalized layer output as an input to the second neural network layer.
50. The computer-readable storage medium according to claim 49, wherein, Normalizing each component of each layer output includes: Normalize the component using the mean and variance of the feature index corresponding to the component.
51. The computer-readable storage medium according to claim 49, wherein, Generating the corresponding batch-normalized layer output for each training example in the training examples from the normalized layer output includes: Transform the component according to the current value of the parameter set of the feature index corresponding to each component of the normalized layer output.
52. The computer-readable storage medium according to claim 51, wherein, The batch normalization layer is configured to, after the neural network has been trained to determine the training values of the parameters of each feature index in the feature index: Receive a new first layer input generated from a new neural network input; Normalize each component of the new output of the first layer using the pre-computed mean and standard deviation statistics for the feature index to generate a new normalized layer output; Generate a new batch-normalized layer output by transforming the component according to the training value of the parameter set of the feature index corresponding to each component of the normalized layer output; and Provide the new batch-normalized layer output as a new layer input to the second neural network layer.
53. The computer-readable storage medium according to claim 49, wherein, The first convolutional neural network layer generates the output of the first layer by applying a convolution to the input of the first layer according to the current value of the parameter set of the first convolutional neural network layer.
54. The computer-readable storage medium according to claim 53, wherein, The second neural network layer generates the output of the second layer by applying a non-linear operation to the output of the batch normalization layer.
55. The computer-readable storage medium according to claim 49, wherein, The first neural network layer generates the output of the first layer by applying a convolution to the input of the first layer according to the current value of the parameter set of the first convolutional neural network layer to generate a modified input of the first layer and then applying a non-linear operation to the modified input of the first layer.
56. The computer-readable storage medium according to claim 49, wherein, During the training of the neural network, the neural network system is configured to backpropagate the normalization statistics as part of adjusting the parameter values of the neural network.
57. A method performed by one or more computers, the method comprising: during training of an image classification neural network, receiving a network input comprising an image or image features of the image; and processing the network input using the image classification neural network to generate a network output comprising respective scores for each object class in a set of object classes, the score for each object class representing the likelihood that the image contains an image of an object belonging to the class, the convolutional neural network comprising: a plurality of neural network layers, the plurality of neural network layers including a first convolutional neural network layer and a second neural network layer; and a batch normalization layer between the first convolutional neural network layer and the second neural network, wherein the first convolutional neural network layer generates a first layer output having a plurality of components, the plurality of components being indexed by a feature index and a spatial location index, and wherein the batch normalization layer is configured to, during training of the convolutional neural network on a batch of training examples: receive the respective first layer output for each training example in the batch; calculate a plurality of normalization statistics for the batch based on the first layer output, wherein calculating the plurality of normalization statistics for the first layer output includes, for each feature index in the feature index: calculating an average of the components of the first layer output corresponding to the feature index; and calculating a variance of the components of the first layer output corresponding to the feature index; normalizing each component of each first layer output using the normalization statistics to generate a respective normalized layer output for each training example in the batch; generating a respective batch normalization layer output for each training example in the training examples from the normalized layer output; and providing the batch normalization layer output as an input to the second neural network layer.
58. The method of claim 57, wherein normalizing each component of each layer output includes: normalizing the component using the average and the variance of the feature index corresponding to the component.
59. The method of claim 57, wherein generating the respective batch normalization layer output for each training example in the training examples from the normalized layer output includes: transforming the component according to a current value of a set of parameters of the feature index corresponding to each component of the normalized layer output.
60. The method of claim 59, wherein the batch normalization layer is configured to, after the image classification neural network has been trained to determine training values of the parameters for each feature index in the feature index: receive a new first layer input generated from a new neural network input; Normalize each component of the new first layer output using pre-computed mean and standard deviation statistics for the feature indices to generate a new normalized layer output; Generate a new batch normalization layer output by transforming each component according to the training values of the parameter sets for the feature indices corresponding to each component of the normalized layer output; and Provide the new batch normalization layer output as the new layer input to the second neural network layer.
61. An image processing neural network system implemented by one or more computers, the neural network system comprising: A convolutional neural network configured to receive a network input including an image or image features of the image and generate a network output for the network input, and the convolutional neural network includes: A plurality of neural network layers including a first convolutional neural network layer and a second neural network layer; and A batch normalization layer between the first convolutional neural network layer and the second neural network layer, wherein the first convolutional neural network layer generates a first layer output having a plurality of components indexed by feature indices and spatial position indices, and wherein the batch normalization layer is configured to, during training of the convolutional neural network on a batch of training examples: Receive the corresponding first layer output of each training example in the batch; Calculate a plurality of normalization statistics for the batch based on the first layer output, wherein calculating the plurality of normalization statistics for the first layer output includes, for each feature index in the feature indices: Calculating the mean of the components of the first layer output corresponding to the feature index; and Calculating the variance of the components of the first layer output corresponding to the feature index; Normalize each component of each first layer output using the normalization statistics to generate the corresponding normalized layer output for each training example in the batch; Generate the corresponding batch normalization layer output for each training example in the training examples from the normalized layer output; and Provide the batch normalization layer output as the input to the second neural network layer.
62. The image processing neural network system according to claim 61, wherein Normalizing each component of each layer output includes: Normalizing the component using the mean and variance of the feature index corresponding to the component.
63. The image processing neural network system according to claim 61, wherein Generating the corresponding batch normalization layer output for each training example in the training examples from the normalized layer output includes: Transforming each component according to the current values of the parameter sets for the feature indices corresponding to each component of the normalized layer output.
64. The image processing neural network system according to claim 63, wherein The batch normalization layer is configured to, after the neural network has been trained to determine the training values of the parameters for each feature index in the feature indices: Receive a new first-layer input generated from a new neural network input; Normalize each component of the new first-layer output using pre-computed mean and standard deviation statistics for the feature index to generate a new normalized layer output; Generate a new batch normalization layer output by transforming each component according to the training value of the parameter set of the feature index corresponding to each component of the normalized layer output; And Provide the new batch normalization layer output as a new layer input to the second neural network layer.
65. The image processing neural network system according to claim 61, wherein, The first convolutional neural network layer generates the first-layer output by applying convolution to the first-layer input according to the current value of the parameter set of the first convolutional neural network layer.
66. The image processing neural network system according to claim 65, wherein, The second neural network layer generates a second-layer output by applying a non-linear operation to the batch normalization layer output.
67. The image processing neural network system according to claim 61, wherein, The first neural network layer generates the first-layer output by applying convolution to the first-layer input according to the current value of the parameter set of the first convolutional neural network layer to generate a modified first-layer input and then applying a non-linear operation to the modified first-layer input.
68. The image processing neural network system according to claim 61, wherein, During the training of the neural network, the neural network system is configured to backpropagate the normalization statistics as part of adjusting the parameter values of the neural network.
69. One or more non-transitory computer-readable storage media storing instructions that, when executed by one or more computers, cause the one or more computers to implement a neural network system for processing images, the neural network system comprising: A convolutional neural network configured to receive a network input including an image or image features of the image and generate a network output for the image input, the convolutional neural network comprising: A plurality of neural network layers including a first convolutional neural network layer and a second neural network layer; and A batch normalization layer between the first convolutional neural network layer and the second neural network layer, wherein the first convolutional neural network layer generates a first-layer output having a plurality of components indexed by a feature index and a spatial position index, and wherein the batch normalization layer is configured to, during the training of the convolutional neural network on a batch of training examples: Receive the corresponding first-layer output of each training example in the batch; Calculate a plurality of normalization statistics for the batch based on the first-layer output, wherein calculating the plurality of normalization statistics for the first-layer output includes, for each feature index in the feature index: Calculate the mean of the components of the first-layer output corresponding to the feature index; and Calculate the variance of the components of the first layer output corresponding to the feature indices; Normalize each component of each first layer output using the normalization statistic to generate a corresponding normalized layer output for each training example in the batch; Generate a corresponding batch-normalized layer output for each training example in the training examples from the normalized layer outputs; and Provide the batch-normalized layer output as an input to the second neural network layer.
70. The computer-readable storage medium according to claim 69, wherein, Normalizing each component of each layer output includes: Normalizing the component using the mean and variance of the feature index corresponding to the component.
71. The computer-readable storage medium according to claim 69, wherein, Generating the corresponding batch-normalized layer output for each training example in the training examples from the normalized layer outputs includes: Transforming the component according to the current value of the parameter set of the feature index corresponding to each component of the normalized layer output.
72. The computer-readable storage medium according to claim 71, wherein, The batch normalization layer is configured to, after the neural network has been trained to determine the training values of the parameters of each feature index in the feature indices: Receive a new first layer input generated from a new neural network input; Normalize each component of the new first layer output using pre-computed mean and standard deviation statistics for the feature index to generate a new normalized layer output; Generate a new batch-normalized layer output by transforming the component according to the training value of the parameter set of the feature index corresponding to each component of the normalized layer output; and Provide the new batch-normalized layer output as a new layer input to the second neural network layer.
73. The computer-readable storage medium according to claim 69, wherein, The first convolutional neural network layer generates the first layer output by applying a convolution to the first layer input according to the current value of the parameter set of the first convolutional neural network layer.
74. The computer-readable storage medium according to claim 73, wherein, The second neural network layer generates a second layer output by applying a non-linear operation to the batch-normalized layer output.
75. The computer-readable storage medium according to claim 69, wherein, The first neural network layer generates the first layer output by applying a convolution to the first layer input according to the current value of the parameter set of the first convolutional neural network layer to generate a modified first layer input and then applying a non-linear operation to the modified first layer input.
76. The computer-readable storage medium according to claim 69, wherein, During the training of the neural network, the neural network system is configured to backpropagate the normalization statistic as part of adjusting the parameter values of the neural network.
77. A method performed by one or more computers, the method comprising: During the training of a convolutional neural network, a network input including an image or image features of the image is received; and processing the network input using the convolutional neural network to generate a network output for the network input, the convolutional neural network including: a plurality of neural network layers, the plurality of neural network layers including a first convolutional neural network layer and a second neural network layer; and a batch normalization layer, the batch normalization layer being between the first convolutional neural network layer and the second neural network, wherein the first convolutional neural network layer generates a first layer output having a plurality of components, the plurality of components being indexed by a feature index and a spatial position index, and wherein the batch normalization layer is configured to, during the training of the convolutional neural network on a batch of training examples: receive the respective first layer output of each training example in the batch; calculate a plurality of normalization statistics for the batch based on the first layer output, wherein calculating the plurality of normalization statistics of the first layer output includes, for each feature index in the feature index: calculating an average value of the component of the first layer output corresponding to the feature index; and calculating a variance of the component of the first layer output corresponding to the feature index; normalizing each component of each first layer output using the normalization statistics to generate a respective normalized layer output for each training example in the batch; generating a respective batch normalization layer output for each training example in the training examples from the normalized layer output; and providing the batch normalization layer output as an input to the second neural network layer.
78. The method according to claim 77, wherein, normalizing each component of each layer output includes: normalizing the component using the average value and the variance of the feature index corresponding to the component.
79. The method according to claim 77, wherein, generating the respective batch normalization layer output for each training example in the training examples from the normalized layer output includes: transforming the component according to the current value of the parameter set of the feature index corresponding to each component of the normalized layer output.
80. The method according to claim 79, wherein, the batch normalization layer is configured to, after the neural network has been trained to determine the training values of the parameters of each feature index in the feature index: receive a new first layer input generated from a new neural network input; normalizing each component of the new first layer output using the pre-computed average value and standard deviation statistics for the feature index to generate a new normalized layer output; generating a new batch normalization layer output by transforming the component according to the training value of the parameter set of the feature index corresponding to each component of the normalized layer output; and providing the new batch normalization layer output as a new layer input to the second neural network layer.
81. The method according to claim 77, wherein, The first convolutional neural network layer generates the first layer output by applying a convolution to the first layer input according to the current value of the parameter set of the first convolutional neural network layer.
82. The method according to claim 81, wherein, the second neural network layer generates a second layer output by applying a non-linear operation to the batch normalization layer output.
83. The method according to claim 77, wherein, the first neural network layer generates the first layer output by applying a convolution to the first layer input according to the current value of the parameter set of the first convolutional neural network layer to generate a modified first layer input and then applying a non-linear operation to the modified first layer input.
84. The method according to claim 77, further comprising, during the training of the neural network, backpropagating the normalization statistics as part of adjusting the parameter values of the neural network.