This disclosure relates generally to neural networks, and, more particularly, to methods and apparatus to dynamically normalize data in neural networks.
Neural networks and other types of machine learning models are useful tools that have demonstrated their value solving complex problems regarding pattern recognition, natural language processing, automatic speech recognition, etc. Neural networks operate using artificial neurons arranged into one or more layers that process data from an input layer to an output layer, applying weighting values to the data during the processing of the data. Such weighting values are typically determined during a training process.
The figures are not to scale. In general, the same reference numbers will be used throughout the drawing(s) and accompanying written description to refer to the same or like parts.
Unless specifically stated otherwise, descriptors such as “first,” “second,” “third,” etc. are used herein without imputing or otherwise indicating any meaning of priority, physical order, arrangement in a list, and/or ordering in any way, but are merely used as labels and/or arbitrary names to distinguish elements for ease of understanding the disclosed examples. In some examples, the descriptor “first” may be used to refer to an element in the detailed description, while the same element may be referred to in a claim with a different descriptor such as “second” or “third.” In such instances, it should be understood that such descriptors are used merely for identifying those elements distinctly that might, for example, otherwise share a same name.
Artificial intelligence (AI), including machine learning (ML), deep learning (DL), and/or other artificial machine-driven logic, enables machines (e.g., computers, logic circuits, etc.) to use a model to process input data to generate an output based on patterns and/or associations previously learned by the model via a training process. For instance, the model may be trained with data to recognize patterns and/or associations and follow such patterns and/or associations when processing input data such that other input(s) result in output(s) consistent with the recognized patterns and/or associations.
Many different types of machine learning models and/or machine learning architectures exist. One particular type of machine learning model is a neural network. In general, machine learning models/architectures that are suitable to use in the example approaches disclosed herein will be any type of neural network (e.g., a recurrent neural network (RNN), a convolutional neural network (CNN), a deep neural network (DNN), etc.) that involves the normalization of data being analyzed at one or more of the layers in the network.
Normalization plays an important role in both the training of deep neural networks and the implementation of deep neural networks to make inferences about input data. Frequently, normalization involves the standardization of the data being analyzed by re-centering (e.g., zero-centering) the data and by re-scaling and/or shifting data using statistics (e.g., mean and standard deviation) calculated from a running subset of the data. More particularly, in some examples, the calculated statistics are used to standardize the input data to have a mean of 0 and a standard deviation of 1. This normalization process is usually implemented at each layer in a neural network. Thus, the data being re-centered and re-scaled corresponds to either the original input data to the neural network (for the input layer) or the output data of a previous layer in the neural network (for every subsequent layer). The component(s) of a neural network that perform normalization are sometimes referred to as normalizers and may be implemented via software, firmware, and/or hardware.
Many known normalization techniques estimate the statistics (e.g., mean and standard deviation) used to standardize or normalize input data at each layer in a neural network during training across a certain subset of the training data. Such estimated statistics are then defined as internal parameters of the neural network that are used during the inference stage associated with the analysis of new and different input data (e.g., other than the training data). However, different input samples (e.g., the underlying data to be analyzed), for training and/or inference, carry distinctive features for which different statistics may be appropriate to standardize the data for improved performance (e.g., more accurate inferences). However, existing normalization techniques are unable to adjust the statistics based on the particular features of a current input sample being analyzed because the statistics are defined as internal parameters of the machine learning model without regard to the particular input data being analyzed. By contrast, examples disclosed herein enable a normalizer to dynamically adjust the estimated statistics for normalization developed during training in a manner that is conditioned on and/or in response to particular features of the particular input data being analyzed. In other words, the normalization process disclosed herein is sample aware and is able to dynamically adapt to different features of different samples. As a result, examples disclosed herein achieve greater accuracy than is possible using existing normalization techniques that are premised on fixed internal model parameters developed during training independent of the particular input data under analysis.
Many different normalization techniques have been developed in the past including batch normalization (BN), instance normalization (IN), layer normalization (LN), group normalization (GN), batch-instance normalization (BIN), and switchable normalization (SN). Such techniques each have different applications, advantages, and drawbacks. For example, BN techniques standardize the data using statistics estimated batch-wise (e.g., the mean and standard deviation are calculated across different batches in a subset (e.g., a mini-batch) of the available training dataset). BN techniques are sensitive to the size of (e.g., number of batches in) the training data. Thus, while BN techniques are relatively accurate for a large number of batches in the training dataset, such techniques becomes less reliable when the number of batches is relatively small. IN techniques standardize the data using statistics estimated channel-wise (e.g., the mean and standard deviation are calculated across different channels in the mini-batch). IN techniques have been found to be well suited for recurrent neural network (RNN) models and have been successfully implemented in image stylization tasks. LN techniques standardize the data using statistics estimated layer-wise (e.g., the mean and standard deviation are calculated across different features in the mini-batch). GN techniques divide the channels into groups and estimate the statistics for standardization of data within each group, thereby alleviating the sensitivity to batch size. However, GN techniques are sensitive to the number of groups, which is defined as a hyperparameter for the neural network. Both BIN and SN techniques involve the combination of different normalization techniques. More particularly, BIN techniques adaptively adjust (e.g., through weight averaging) a combination of both the BN techniques (e.g., batch-wise estimated statistics) and the IN techniques (e.g., channel-wise estimated statistics). SN techniques adaptively adjust (e.g., through weight averaging) a combination of BN techniques, IN techniques, and LN techniques.
Each of the above normalization techniques has particular advantages that make the particular technique suitable for certain applications. However, each also presents certain limitations and/or disadvantages. Among other things, as already noted above, existing normalization techniques are not able to dynamically adjust or calculate statistics for data standardization based on the particular input data being analyzed but are limited to fixed internal parameters generated during training based on the relevant subset of the input data used for the particular normalization technique employed. Further, existing normalizers typically implement a single normalization technique that is applied at every layer in a neural network such that the different types of normalization methodologies cannot be taken advantage of when appropriate for different layers within a single network architecture. While the BIN and SN techniques do involve the combination of different techniques, the weight averaging of the different techniques is not dynamically based on the sample input data being analyzed but still depend on fixed internal model parameters among summed input dimensions developed during model training.
Furthermore, different normalizers are typically designed to perform different tasks (e.g., object detection, image classification, video recognition, speech recognition, image stylization, etc.) such that model designs that involve multiple tasks can be cumbersome. Further still, the generally specific applications or tasks to which normalizers are designed limits the ability of a neural network to be adapted or reworked for other tasks not originally contemplated when initially developing the neural network. Examples disclosed herein overcome these disadvantages by providing a generally applicable normalization engine that can readily adapt to different tasks while maintaining relatively high performance (e.g., producing relatively accurate outputs) by adjusting the normalization process based on the particular input data being analyzed.
More specifically, example normalization engines disclosed herein include a set of multiple different normalizers to implement different normalization techniques. Example normalization engines also include a soft weighting engine to dynamically generate weights indicative of the contribution of the outputs of the multiple different normalizers. In some examples, the different normalization techniques implemented by the example normalization engines may correspond to any past, present, or future normalization techniques, thereby enabling the normalization engine to adapt to different tasks and/or circumstances. That is, example normalization engines disclosed herein implement multiple different normalizers that use different normalization techniques to redistribute input samples from different aspects, thereby enriching the representation of the input features. This can lead to improved accuracy in the output of neural network models over existing methodologies that rely on a single normalization technique. Further, in some examples, the weights generated by the soft weighting engine are calculated based on the sample data specific to the underlying input data under analysis, thereby enabling the normalization process to dynamically adjust in response to distinctive features that may appear in the data.
As represented in
In the illustrated example of
As shown in the illustrated example of
In some examples, each of the normalization techniques 204, 206, 208 corresponds to a different normalization technique. The particular normalization techniques implemented may be any suitable past, present, or future technique. For example, the first normalization technique 204 may correspond to batch normalization (BN), the second normalization technique 206 may correspond to instance normalization (IN), and the third normalization technique 208 may correspond to layer normalization (LN). As described above, these different normalization techniques have different advantages that are suitable to different circumstances (e.g., different deep learning tasks and/or different network architectures). As such, having a variety of different normalization techniques that implement different normalization techniques enable a system implementing the example DSN process flow 200 of
Stated generally, each of the normalization techniques 204, 206, 208 are implemented to estimate statistics, such as the mean and variance (e.g., standard deviation) of the underlying data (e.g., the input data 202). The normalization techniques 204, 206, 208 differ based on the particular subset of the data (e.g., particular pixels of one or more sample images/input data) used to calculate the relevant estimated statistics. The normalized output of the different normalization techniques 204, 206, 208 may be generically represented mathematically as
where γk and βk are respective scale and shift parameters of the kth normalization technique, ϵ is a small constant to preserve numerical stability, and μk and σk are the respective mean and standard deviation estimated using a particular set of input pixels as defined by the kth normalization technique.
As mentioned above, there are some known normalization techniques that already involve the combination of two or more other known normalization techniques (e.g., BIN and SN techniques). These techniques may also be used for one or more of the normalization techniques 204, 206, 208 shown in
where αk is the kth soft weight 212 and Normk is the kth normalization technique 204, 206, 208. The final normalized output 216 corresponds to the output of the normalization operation 108 of
As used herein, the term “soft,” used in the context of “soft weights,” means that the weights are given a value on a continuous scale rather than being defined as one of different discrete values. For instance, in some examples, the soft weights may be calculated to have any value from 0 to 1 (rather than “hard” weights, which may be limited to either a value of 0 or a value of 1). The soft weights need not be limited to a scale or range from 0 to 1 but may be assigned any suitable values (e.g., negative values, values greater than 1, etc.).
As represented in
The mapping operation 304 involves mapping the C-dimensional feature vector 308 either linearly or non-linearly to a k-dimensional vector 310, where k is the number of normalization techniques 204, 206, 208 implemented in the example DSN process flow 200 of
Finally, the scaling operation 306 involves scaling the values in the k-dimensional vector 310 to k-dimensional soft weights 212. In some examples, the soft weights are scaled such that all of the soft weights sum to 1 (e.g., Σkαk=1). In some examples, this scaling operation 306 is implemented with a softmax layer that uses the softmax function to map the input vector (e.g., the k-dimensional vector 310) to the output soft weights 212. In other examples, the soft weights may be scaled in any other suitable manner. In some examples, scaling may be omitted such that the values of the elements in the k-dimensional vector 310 define the soft weights 212.
As noted above, the soft weights 212 are calculated based on the input data 202 and applied to respective ones of the alternate normalized outputs of the normalization techniques 204, 206, 208 to calculate the final normalized output 216. Thus, unlike existing normalization methodologies that use or share fixed internal normalization parameters across different samples, the final normalized output 216 of the illustrated example is dynamically adjusted based on different contributions of different normalization techniques 204, 206, 208 as determined by the discrimination of the specific input sample(s) that are to be normalized. Furthermore, in addition to the soft weights 212 (and, thus, the final normalized output 216) varying from sample to sample, the ability of the soft weights 212 to define different contributions of the different underlying normalization techniques 204, 206, 208 enable the overall DSN process flow 200 to adapt in different normalization layers for different network architectures and/or to adapt to different deep learning tasks.
The implementation of multiple different normalization techniques 204, 206, 208, as well as the soft weight generation process 210 result in an increase of compute operations for an associated neural network. However, the extra compute operations amount to a relatively small proportion of all operations performed in connection with the implementation of a full neural network. That is, the memory and/or computational costs of many existing normalizers like BN and its variants are very small compared with of full neural network model such that implementing several different normalizers will not have a significant impact. For example, given a 3×3 convolutional layer with an input feature map having a size denoted by W×H×Cin (where Cin is frequently 128, 256, 512, 1024, or 2048, but may be larger) and an output feature map with a size denoted by W×H×Cout (where Cout is frequently one or two times that of Cin), the number of convolutional parameters is equal to 3×3×CinCout and the number of floating point operations (FLOPs) (e.g., multiply-add operations) is W×H×3×3×Cin×Cout Relative to this total number of convolutional parameters, the parameter size for BN is only 4×Cout, which corresponds to 4/(3×3×Cin) of the total number of parameters for the entire convolutional layer (e.g., approximately 0.26% of the total when Cin is 128 and a much smaller percentage as Cin increases). Further, the number of FLOPs for BN is 2×Cout×W×H, which is only 2/(3×3×Cin) of the total number of FLOPs (e.g., approximately 0.13% of the total when Cin is 128 and a much smaller percentage as Cin increases). Many other known normalization techniques (e.g., LN, IN, GN, etc.) have similar memory and/or computational costs to that of BN. Thus, even if multiple different normalization techniques are implemented, as disclosed herein, the combined size of the parameters for all of the different techniques would remain a relatively small percentage of the total size of the neural network.
The memory and/or computational cost of the soft weight generation process to dynamically determine the contribution of each of the different normalization techniques is also relatively small when compared with the entire model. In particular, with reference to
The relatively minor increase in computational operations becomes insignificant in view of the versatility of neural networks constructed with a normalization process flow as detailed in
Additionally, calculating soft weights 212 based on input samples to determine the appropriate combination of the underlying normalization techniques 204, 206, 208 that contribute to the final normalized output 216 has been shown to provide a significant performance boost (e.g., increased accuracy) relative to other known normalization methodologies. Thus, the relatively small increase in computational costs is more than offset by the improvement to the accuracy of example neural networks that implement teachings disclosed herein.
More particular, during experimental testing, an example DSN engine to implement the example DSN process flow 200 of
Further experimental testing was performed by implementing a large-scale video classification task using the Kinetics dataset on a ResNet-50 I3D backbone. The models were all pre-trained using the ImageNet dataset. The top-1 and top-5 classification accuracies on the validation set are shown in Table 2 based on a standard 10-clip testing that averages softmax scores from 10 clips that are evenly sampled. Similar to the image classification task (summarized in Table 1), as shown in Table 2, the example DSN engine outperforms both BN and GN based networks with stable margins under all three settings for a video recognition task.
The example computing system 400 may be implemented as a component of another system such as, for example, a mobile device, a wearable device, a laptop computer, a tablet, a desktop computer, a server, etc. In some examples, the input and/or output data is received via inputs and/or outputs of the system of which the computing system 400 is a component.
In some examples, the example model executor 402, the example model trainer 410, and the example DSN engine 414 are implemented by one or more logic circuits such as, for example, hardware processors. In some examples, one or more of the example model executor 402, the example model trainer 410, or the example DSN engine 414 are implemented by a same hardware component (e.g., a same logic circuit). However, any other type of circuitry may additionally or alternatively be used such as, for example, one or more analog or digital circuit(s), logic circuits, programmable processor(s), application specific integrated circuit(s) (ASIC(s)), programmable logic device(s) (PLD(s)), field programmable logic device(s) (FPLD(s)), digital signal processor(s) (DSP(s)), etc.
In examples disclosed herein, the example model executor 402 executes a machine learning model. The example machine learning model may be implemented using a neural network (e.g., a deep neural network). However, any other past, present, and/or future machine learning topology(ies) and/or architecture(s) may additionally or alternatively be used.
To execute a model, the example model executor 402 accesses input data via the input interface 404. In some examples, the example model executor 402 (using the example DSN engine 414) applies the model (defined by the internal model parameters stored in the model parameter memory 406) to the input data. The model executor 402 provides the result to the output interface 408 for further use.
The example input interface 404 of the illustrated example of
The example model parameter memory 406 of the illustrated example of
The example output interface 408 of the illustrated example of
The example model trainer 410 of the illustrated example of
The example model trainer 410 determines whether the training error is less than a training error threshold. If the training error is less than the training error threshold, then the model has been trained such that it results in a sufficiently low amount of error, and no further training is needed. The particular value for the training error depends on the particular task for which the model is being implemented. In some examples, other types of factors (e.g., other than a training error) may be considered when determining whether model training is complete. For example, an amount of training iterations performed and/or an amount of time elapsed during the training process may be considered.
The example training data interface 412 of the illustrated example of
The example model communicator 416 of the illustrated example of
The example DSN engine 414 of the illustrated example generates a final normalized output based on input data using multiple different normalization techniques. In some examples, the DSN engine 414 may be implemented in connection with different layers in a neural network. Thus, the input data may correspond to the input data received at the input interface and/or correspond to an output of a previous layer in the neural network (e.g., one or more feature maps). Further detail regarding the implementation of the example DSN engine is shown in connection with
In the illustrated example, the DSN engine 414 includes one or more example normalization calculators 510 to calculate alternate normalized outputs based on the input data using different normalization techniques (e.g., the normalization techniques 204, 206, 208 represented in
As shown in the illustrated example of
While an example manner of implementing the computing system 400 is illustrated in
Flowcharts representative of example hardware logic, machine readable instructions, hardware implemented state machines, and/or any combination thereof for implementing the computing system 400 of
The machine readable instructions described herein may be stored in one or more of a compressed format, an encrypted format, a fragmented format, a compiled format, an executable format, a packaged format, etc. Machine readable instructions as described herein may be stored as data or a data structure (e.g., portions of instructions, code, representations of code, etc.) that may be utilized to create, manufacture, and/or produce machine executable instructions. For example, the machine readable instructions may be fragmented and stored on one or more storage devices and/or computing devices (e.g., servers) located at the same or different locations of a network or collection of networks (e.g., in the cloud, in edge devices, etc.). The machine readable instructions may require one or more of installation, modification, adaptation, updating, combining, supplementing, configuring, decryption, decompression, unpacking, distribution, reassignment, compilation, etc. in order to make them directly readable, interpretable, and/or executable by a computing device and/or other machine. For example, the machine readable instructions may be stored in multiple parts, which are individually compressed, encrypted, and stored on separate computing devices, wherein the parts when decrypted, decompressed, and combined form a set of executable instructions that implement one or more functions that may together form a program such as that described herein.
In another example, the machine readable instructions may be stored in a state in which they may be read by processor circuitry, but require addition of a library (e.g., a dynamic link library (DLL)), a software development kit (SDK), an application programming interface (API), etc. in order to execute the instructions on a particular computing device or other device. In another example, the machine readable instructions may need to be configured (e.g., settings stored, data input, network addresses recorded, etc.) before the machine readable instructions and/or the corresponding program(s) can be executed in whole or in part. Thus, machine readable media, as used herein, may include machine readable instructions and/or program(s) regardless of the particular format or state of the machine readable instructions and/or program(s) when stored or otherwise at rest or in transit.
The machine readable instructions described herein can be represented by any past, present, or future instruction language, scripting language, programming language, etc. For example, the machine readable instructions may be represented using any of the following languages: C, C++, Java, C #, Perl, Python, JavaScript, HyperText Markup Language (HTML), Structured Query Language (SQL), Swift, etc.
As mentioned above, the example processes of
“Including” and “comprising” (and all forms and tenses thereof) are used herein to be open ended terms. Thus, whenever a claim employs any form of “include” or “comprise” (e.g., comprises, includes, comprising, including, having, etc.) as a preamble or within a claim recitation of any kind, it is to be understood that additional elements, terms, etc. may be present without falling outside the scope of the corresponding claim or recitation. As used herein, when the phrase “at least” is used as the transition term in, for example, a preamble of a claim, it is open-ended in the same manner as the term “comprising” and “including” are open ended. The term “and/or” when used, for example, in a form such as A, B, and/or C refers to any combination or subset of A, B, C such as (1) A alone, (2) B alone, (3) C alone, (4) A with B, (5) A with C, (6) B with C, and (7) A with B and with C. As used herein in the context of describing structures, components, items, objects and/or things, the phrase “at least one of A and B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, and (3) at least one A and at least one B. Similarly, as used herein in the context of describing structures, components, items, objects and/or things, the phrase “at least one of A or B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, and (3) at least one A and at least one B. As used herein in the context of describing the performance or execution of processes, instructions, actions, activities and/or steps, the phrase “at least one of A and B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, and (3) at least one A and at least one B. Similarly, as used herein in the context of describing the performance or execution of processes, instructions, actions, activities and/or steps, the phrase “at least one of A or B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, and (3) at least one A and at least one B.
As used herein, singular references (e.g., “a”, “an”, “first”, “second”, etc.) do not exclude a plurality. The term “a” or “an” entity, as used herein, refers to one or more of that entity. The terms “a” (or “an”), “one or more”, and “at least one” can be used interchangeably herein. Furthermore, although individually listed, a plurality of means, elements or method actions may be implemented by, e.g., a single unit or processor. Additionally, although individual features may be included in different examples or claims, these may possibly be combined, and the inclusion in different examples or claims does not imply that a combination of features is not feasible and/or advantageous.
The example process of
In examples disclosed herein, ML/AI models are trained using stochastic gradient descent. However, any other training algorithm may additionally or alternatively be used. In examples disclosed herein, training is performed until an acceptable level of error is achieved. Such training is performed using any suitable training data, which may depend on the particular task for which the model is being implemented. At block 608, the example computing system 400 performs a training iteration based on internal model parameters, where the training includes a normalization process that dynamically adjusts based on the input data. The particular process to perform a training iteration may vary depending on the type of machine learning model being trained and/or the particular task(s) for which the model is being implemented. Accordingly, block 608 of
Once the training iteration is complete, the example model trainer 410, at block 610, determines an amount of training error. That is the model trainer 410 compares an output of the model following the training iteration with expected outputs defined in the training data. At block 612, the example model trainer updates the internal parameters based on the error. Thereafter, at block 614, the example model trainer 410 determines whether to continue training. In some examples, such determination may be based on an amount of training error (e.g., training is to continue if an amount of error exceeds an error threshold). However, any other approach to determining whether training is to continue may additionally or alternatively be used including, for example, an amount of training iterations performed, an amount of time elapsed since training began, etc. If the model trainer 410 determines that training is to continue (e.g., block 614 returns a result of YES), control returns to block 606 to repeat the process.
If the model trainer 410 determines that training is not to continue (e.g., block 614 returns a result of NO), control advances to block 616 where the model is stored at the model parameter memory 406 of the example computing system 400. In some examples, the model is stored as an executable construct that processes an input and provides an output based on the network of nodes and connections defined in the model. While in examples disclosed herein, the model is stored in the model parameter memory 406, the model may additionally or alternatively be communicated to a model parameter memory of a different computing system via the model communicator 416. The model may then be executed by the model executor 402.
Once trained, the deployed model may be operated in the operational (e.g., inference) phase 604 to process data. In the inference phase, data to be analyzed (e.g., live data) is input to the model, and the model is executed to generate an output. This inference phase can be thought of as the computing system “thinking” to generate the output based on what was learned from the training (e.g., by executing the model to apply the learned patterns and/or associations to the live data).
As represented in
At block 624, the example model trainer 410 monitors the output of the model to determine whether to attempt re-training of the model. In this manner, output of the deployed model may be captured and provided as feedback. By analyzing the feedback, an accuracy of the deployed model can be determined. If the feedback indicates that the accuracy of the deployed model is less than a threshold or other criterion, training of an updated model can be triggered using the feedback and an updated training data set, hyperparameters, etc., to generate an updated, deployed model. In some examples, re-training may occur to adjust or adapt the model to a different task. If re-training is to occur (e.g., block 624 returns a result of YES), control returns to block 606, where the training phase 602 is repeated. If re-training is not to occur (e.g., block 624 returns a result of NO), control advances to block 626 where the example model executor 402 determines whether there is more input data to analyze. If so (e.g., block 626 returns a result of YES), control returns to block 618. Otherwise (e.g., block 626 returns a result of NO), the example process of
The example process of
At block 708, the example normalization calculator(s) 510 calculate alternate normalized outputs based on the input data using different normalization techniques (e.g., the normalization techniques 204, 206, 208 of
The processor platform 800 of the illustrated example includes a processor 812. The processor 812 of the illustrated example is hardware. For example, the processor 812 can be implemented by one or more integrated circuits, logic circuits, microprocessors, GPUs, DSPs, VPUs, AI-specific processors, or controllers from any desired family or manufacturer. The hardware processor 812 may be a semiconductor based (e.g., silicon based) device. In this example, the processor implements the example model executor 402, the example model trainer 410, and the example DSN engine 414 (including the example soft weighting engine 502, the example spatial aggregation analyzer 504, the example mapping analyzer 506, the example scaling analyzer 508, the example normalization calculator(s) 510, and the example normalized output generator 512).
In some examples, the processor platform 800 includes a second processor 813 (e.g., a co-processor). The second processor 813 of the illustrated example is hardware. For example, the second processor 813 can be implemented by one or more integrated circuits, logic circuits, microprocessors, GPUs, DSPs, VPUs, AI-specific processors, or controllers from any desired family or manufacturer. The second processor 813 may be a semiconductor based (e.g., silicon based) device. In some examples, the second processor 813 implements one or more of the example model executor 402, the example model trainer 410, and the example DSN engine 414 (including the example soft weighting engine 502, the example spatial aggregation analyzer 504, the example mapping analyzer 506, the example scaling analyzer 508, the example normalization calculator(s) 510, and the example normalized output generator 512), while the main processor 812 implements different ones of the components of the computing system 400 detailed in
The processor 812 of the illustrated example includes a local memory 814 (e.g., a cache). The processor 812 of the illustrated example is in communication with a main memory including a volatile memory 815 and a non-volatile memory 816 via a bus 818. The volatile memory 815 may be implemented by Synchronous Dynamic Random Access Memory (SDRAM), Dynamic Random Access Memory (DRAM), RAMBUS® Dynamic Random Access Memory (RDRAM®) and/or any other type of random access memory device. The non-volatile memory 816 may be implemented by flash memory and/or any other desired type of memory device. Access to the main memory 815, 816 is controlled by a memory controller.
The processor platform 800 of the illustrated example also includes an interface circuit 820. The interface circuit 820 may be implemented by any type of interface standard, such as an Ethernet interface, a universal serial bus (USB), a Bluetooth® interface, a near field communication (NFC) interface, and/or a PCI express interface.
In the illustrated example, one or more input devices 822 are connected to the interface circuit 820. The input device(s) 822 permit(s) a user to enter data and/or commands into the processor 812. The input device(s) can be implemented by, for example, an audio sensor, a microphone, a camera (still or video), a keyboard, a button, a mouse, a touchscreen, a track-pad, a trackball, isopoint and/or a voice recognition system. In this example, the interface circuit 820 implements the example input interface 404, the example output interface 408, the example training data interface 412, the example model communicator 416.
One or more output devices 824 are also connected to the interface circuit 820 of the illustrated example. The output devices 824 can be implemented, for example, by display devices (e.g., a light emitting diode (LED), an organic light emitting diode (OLED), a liquid crystal display (LCD), a cathode ray tube display (CRT), an in-place switching (IPS) display, a touchscreen, etc.), a tactile output device, a printer and/or speaker. The interface circuit 820 of the illustrated example, thus, typically includes a graphics driver card, a graphics driver chip and/or a graphics driver processor.
The interface circuit 820 of the illustrated example also includes a communication device such as a transmitter, a receiver, a transceiver, a modem, a residential gateway, a wireless access point, and/or a network interface to facilitate exchange of data with external machines (e.g., computing devices of any kind) via a network 826. The communication can be via, for example, an Ethernet connection, a digital subscriber line (DSL) connection, a telephone line connection, a coaxial cable system, a satellite system, a line-of-site wireless system, a cellular telephone system, etc.
The processor platform 800 of the illustrated example also includes one or more mass storage devices 828 for storing software and/or data. Examples of such mass storage devices 828 include floppy disk drives, hard drive disks, compact disk drives, Blu-ray disk drives, redundant array of independent disks (RAID) systems, and digital versatile disk (DVD) drives. In this example, the mass storage devices 828 implements the example model parameter memory 406.
The machine executable instructions 832 of
From the foregoing, it will be appreciated that example methods, apparatus and articles of manufacture have been disclosed that provide an example normalization engine that is generally applicable to different circumstances by incorporating multiple different normalization techniques that can be dynamically combined in different ways as determined from the unique feature characteristics of the input data being analyzed. The ability to dynamically adjust the contribution of different normalization techniques also significantly improves the accuracy of associated neural networks with negligible increases in computational demand. The general applicability of example normalization engines disclosed herein enable such engines to be deployed on different edge/cloud devices for supporting existing and/or emerging artificial intelligence applications scenarios associated with a large variety of tasks including computer vision, natural language processing, speech recognition, image classification, etc. Furthermore, example normalization engines disclosed herein are also suitable for large-scale parallel training systems that depend upon well-designed, synced normalization techniques to address concerns of gradient vanishing and/or explosion problems while reducing power consumption by accelerating training convergence when batch size becomes relatively large (e.g., 8192). In particular, these requirements are readily satisfied by example normalization engines disclosed herein because the engines are designed to adaptively combine different normalization techniques for improved accuracy at negligible extra computational costs. In other words, the disclosed methods, apparatus, and articles of manufacture improve the efficiency of using a computing device by enabling different normalization techniques to be used in combination for improved accuracy and increased adaptability to different deep learning tasks and/or network architectures. The disclosed methods, apparatus and articles of manufacture are accordingly directed to one or more improvement(s) in the functioning of a computer.
Example 1 includes an apparatus for use with a machine learning model, the apparatus comprising at least one normalization calculator to generate a plurality of alternate normalized outputs associated with input data for the machine learning model, different ones of the alternate normalized outputs based on different normalization techniques, a soft weighting engine to generate a plurality of weights based on the input data, and a normalized output generator to generate a final normalized output based on the plurality of alternate normalized outputs and the plurality of weights.
Example 2 includes the apparatus of example 1, wherein the normalized output generator is to generate the final normalized output as a sum of a product of ones of the plurality of weights and respective ones of the plurality of alternate normalized outputs.
Example 3 includes the apparatus of any one of examples 1 or 2, wherein the input data is first input data and the plurality of weights is a first plurality of weights, the soft weighting engine to generate a second plurality of weights based on second input data different than the first input data, the second plurality of weights different than the first plurality of weights due to distinctions between the first input data and the second input data.
Example 4 includes the apparatus of any one of examples 1-3, wherein the soft weighting engine includes an aggregation analyzer to aggregate the input data into a first vector, and a mapping analyzer to map the first vector to a second vector, a number of elements in the second vector being the same as a number of the different normalization techniques, the plurality of weights based on values in the second vector.
Example 5 includes the apparatus of example 4, wherein the soft weighting engine includes a scaling analyzer to scale the values in the second vector.
Example 6 includes the apparatus of any one of examples 1-5, wherein the machine learning model is a neural network with multiple layers.
Example 7 includes the apparatus of example 6, wherein the input data is first input data for a first layer in the neural network and the plurality of weights is a first plurality of weights, the soft weighting engine to generate a second plurality of weights based on second input data for a second layer in the neural network, the second input data based on the final normalized output.
Example 8 includes the apparatus of example 7, wherein the plurality of alternate normalized outputs is a first plurality of alternate normalized outputs associated with the first layer in the neural network and the final normalized output is a first final normalized output associated with the first layer in the neural network, the at least one normalization calculator to generate a second plurality of alternate normalized outputs associated with second input data, the normalized output generator to generate a second final normalized output based on the second plurality of alternate normalized outputs and the second plurality of weights.
Example 9 includes the apparatus of any one of examples 1-8, wherein the soft weighting engine is to generate the plurality of weights independent of the alternate normalized outputs.
Example 10 includes the apparatus of any one of examples 1-9, wherein the plurality of weights corresponds to soft weights with values that may differ along a range from 0 to 1.
Example 11 includes at least one non-transitory computer readable medium comprising instructions that, when executed, cause at least one processor to at least generate a plurality of alternate normalized outputs associated with input data for a machine learning model, different ones of the alternate normalized outputs based on different normalization techniques, generate a plurality of weights based on the input data, and generate a final normalized output based on the plurality of alternate normalized outputs and the plurality of weights.
Example 12 includes the at least one non-transitory computer readable medium of example 11, wherein the instructions further cause the at least one processor to generate the final normalized output as a sum of a product of ones of the plurality of weights and respective ones of the plurality of alternate normalized outputs.
Example 13 includes the at least one non-transitory computer readable medium of any one of examples 11 or 12, wherein the input data is first input data and the plurality of weights is a first plurality of weights, the instructions to further cause the at least one processor to generate a second plurality of weights based on second input data different than the first input data, the second plurality of weights different than the first plurality of weights due to distinctions between the first input data and the second input data.
Example 14 includes the at least one non-transitory computer readable medium of any one of examples 11-13, wherein the instructions further cause the at least one processor to aggregate the input data into a first vector, and map the first vector to a second vector, a number of elements in the second vector being the same as a number of the different normalization techniques, the plurality of weights based on values in the second vector.
Example 15 includes the at least one non-transitory computer readable medium of example 14, wherein the instructions further cause the at least one processor to scale the values in the second vector.
Example 16 includes the at least one non-transitory computer readable medium of any one of examples 11-15, wherein the machine learning model is a neural network with multiple layers.
Example 17 includes the at least one non-transitory computer readable medium of example 16, wherein the input data is first input data for a first layer in the neural network and the plurality of weights is a first plurality of weights, the instructions to further cause the at least one processor to generate a second plurality of weights based on second input data for a second layer in the neural network, the second input data based on the final normalized output.
Example 18 includes the at least one non-transitory computer readable medium of example 17, wherein the plurality of alternate normalized outputs is a first plurality of alternate normalized outputs associated with the first layer in the neural network and the final normalized output is a first final normalized output associated with the first layer in the neural network, the instructions to further cause the at least one processor to generate a second plurality of alternate normalized outputs associated with second input data, and generate a second final normalized output based on the second plurality of alternate normalized outputs and the second plurality of weights.
Example 19 includes the at least one non-transitory computer readable medium of any one of examples 11-18, wherein the instructions further cause the at least one processor to generate the plurality of weights independent of the alternate normalized outputs.
Example 20 includes the at least one non-transitory computer readable medium of any one of examples 11-19, wherein the plurality of weights corresponds to soft weights with values that may differ along a range from 0 to 1.
Example 21 includes a method for using a machine learning model, the method comprising generating a plurality of alternate normalized outputs associated with input data for the machine learning model, different ones of the alternate normalized outputs based on different normalization techniques, generating a plurality of weights based on the input data, and generating a final normalized output based on the plurality of alternate normalized outputs and the plurality of weights.
Example 22 includes the method of example 21, further including generating the final normalized output as a sum of a product of ones of the plurality of weights and respective ones of the plurality of alternate normalized outputs.
Example 23 includes the method of any one of examples 21 or 22, wherein the input data is first input data and the plurality of weights is a first plurality of weights, the method further including generating a second plurality of weights based on second input data different than the first input data, the second plurality of weights different than the first plurality of weights due to distinctions between the first input data and the second input data.
Example 24 includes the method of any one of examples 21-23, further including aggregating the input data into a first vector, and mapping the first vector to a second vector, a number of elements in the second vector being the same as a number of the different normalization techniques, the plurality of weights based on values in the second vector.
Example 25 includes the method of example 24, further including scaling the values in the second vector.
Example 26 includes the method of any one of examples 21-25, wherein the machine learning model is a neural network with multiple layers.
Example 27 includes the method of example 26, wherein the input data is first input data for a first layer in the neural network and the plurality of weights is a first plurality of weights, the method further including generating a second plurality of weights based on second input data for a second layer in the neural network, the second input data based on the final normalized output.
Example 28 includes the method of example 27, wherein the plurality of alternate normalized outputs is a first plurality of alternate normalized outputs associated with the first layer in the neural network and the final normalized output is a first final normalized output associated with the first layer in the neural network, the method further including generating a second plurality of alternate normalized outputs associated with second input data, and generating a second final normalized output based on the second plurality of alternate normalized outputs and the second plurality of weights.
Example 29 includes the method of any one of examples 21-28, further including generating the plurality of weights independent of the alternate normalized outputs.
Example 30 includes the method of any one of examples 21-29, wherein the plurality of weights corresponds to soft weights with values that may differ along a range from 0 to 1.
Example 31 includes an apparatus for use with a machine learning model, the apparatus comprising means for generating a plurality of alternate normalized outputs associated with input data for the machine learning model, different ones of the alternate normalized outputs based on different normalization techniques, means for generating a plurality of weights based on the input data, and means for generating a final normalized output based on the plurality of alternate normalized outputs and the plurality of weights.
Example 32 includes the apparatus of example 31, wherein the final normalized output generating means is to generate the final normalized output as a sum of a product of ones of the plurality of weights and respective ones of the plurality of alternate normalized outputs.
Example 33 includes the apparatus of any one of examples 31 or 32, wherein the input data is first input data and the plurality of weights is a first plurality of weights, the weights generating means to generate a second plurality of weights based on second input data different than the first input data, the second plurality of weights different than the first plurality of weights due to distinctions between the first input data and the second input data.
Example 34 includes the apparatus of any one of examples 31-33, wherein the weights generating means includes means for aggregating the input data into a first vector, and means for mapping the first vector to a second vector, a number of elements in the second vector being the same as a number of the different normalization techniques, the plurality of weights based on values in the second vector.
Example 35 includes the apparatus of example 34, wherein the weights generating means includes means for scaling the values in the second vector.
Example 36 includes the apparatus of any one of examples 31-35, wherein the machine learning model is a neural network with multiple layers.
Example 37 includes the apparatus of example 36, wherein the input data is first input data for a first layer in the neural network and the plurality of weights is a first plurality of weights, the weights generating means is to generate a second plurality of weights based on second input data for a second layer in the neural network, the second input data based on the final normalized output.
Example 38 includes the apparatus of example 37, wherein the plurality of alternate normalized outputs is a first plurality of alternate normalized outputs associated with the first layer in the neural network and the final normalized output is a first final normalized output associated with the first layer in the neural network, the alternate normalized outputs generating means to generate a second plurality of alternate normalized outputs associated with second input data, the final normalized output generating means to generate a second final normalized output based on the second plurality of alternate normalized outputs and the second plurality of weights.
Example 39 includes the apparatus of any one of examples 31-38, wherein the weights generating means is to generate the plurality of weights independent of the alternate normalized outputs.
Example 40 includes the apparatus of any one of examples 31-39, wherein the plurality of weights corresponds to soft weights with values that may differ along a range from 0 to 1.
Although certain example methods, apparatus and articles of manufacture have been disclosed herein, the scope of coverage of this patent is not limited thereto. On the contrary, this patent covers all methods, apparatus and articles of manufacture fairly falling within the scope of the claims of this patent.
The following claims are hereby incorporated into this Detailed Description by this reference, with each claim standing on its own as a separate embodiment of the present disclosure.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2020/111272 | 8/26/2020 | WO |