Increased accuracy in quantization-aware neural networks using fake quantization nodes

EP4690004A1Pending Publication Date: 2026-02-11QUALCOMM INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
EP2023929041
Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-24
Publication Date
2026-02-11

Smart Images

  • Figure CN2023083592_03102024_PF_FP_ABST
    Figure CN2023083592_03102024_PF_FP_ABST
Patent Text Reader

Abstract

Certain aspects of the present disclosure provide techniques and apparatus for improving accuracy of quantization-aware neural networks using fake quantization nodes (e.g., bias and / or output fake quantization nodes). An example method includes generating an output of a convolutional layer of a neural network based on an input into the neural network; generating an output of an activation layer of the neural network based on the generated convolutional output; generating an output of the neural network based on the output of the activation layer and an output fake quantization node applied to the output of the activation layer; and taking one or more actions based on the generated output of the neural network. In some aspects, a biased output can also be generated through a bias layer of the neural network and a bias fake quantization node applied to the bias layer of the neural network.
Need to check novelty before this filing date? Find Prior Art

Description

INCREASED ACCURACY IN QUANTIZATION-AWARE NEURAL NETWORKS USING FAKE QUANTIZATION NODES

[0001] INTRODUCTION

[0002] Aspects of the present disclosure relate to machine learning and, more particularly, to increasing the accuracy of quantized neural networks.

[0003] When a neural network is trained with higher precision data, but then subsequently deployed to hardware for use with lower precision data, the neural network outputs a value during inference that is different than the expected output from training. That is, during training of the neural network, calculations may be conducted using a higher precision data type. However, when a trained neural network is then deployed to hardware for inference operations, inference operations may use a lower precision data type than that used to train the neural network for various reasons, such as device support for different levels of precision (e.g., processor specifications or limited memory) , power constraints, heat constraints, or the like. As such, the output generated at inference time may be different than the expected output based on training. This, in turn, degrades the accuracy of the trained model on the deployed hardware.

[0004] Quantization-aware training can be used during the training phase of the neural network to emulate inference-time quantization into lower precision fixed-point data for the neural network. With quantization-aware training, the model’s accuracy is improved when performing inference operations on quantized data relative to the accuracy of a model that is not trained (or refined) using quantization-aware training. However, the expected output of the model may still differ from the actual output of the model observed during inference in a production environment (e.g., deployed to a client device) . Accordingly, an improved technique for quantization-aware training of machine learning models is needed.

[0005] BRIEF SUMMARY

[0006] Certain aspects provide a processor-implemented method, comprising: generating an output of a convolutional layer of a neural network based on an input into the neural network; generating an output of an activation layer of the neural network based on the generated output of the convolutional layer; generating an output of the neural network based on the output of the activation layer and an output fake quantization node  applied to the output of the activation layer; and taking one or more actions based on the generated output of the neural network.

[0007] Certain aspects provide a processor-implemented method, comprising: receiving a trained neural network for quantization-aware training; and retraining the neural network via quantization-aware training based on a plurality of fake quantization nodes attached to one or more layers of the neural network, wherein the plurality of fake quantization nodes includes at least an output fake quantization node.

[0008] Other aspects provide processing systems configured to perform the aforementioned methods as well as those described herein; non-transitory, computer-readable media comprising instructions that, when executed by one or more processors of a processing system, cause the processing system to perform the aforementioned methods as well as those described herein; a computer program product embodied on a computer-readable storage medium comprising code for performing the aforementioned methods as well as those further described herein; and a processing system comprising means for performing the aforementioned methods as well as those further described herein.

[0009] The following description and the related drawings set forth in detail certain illustrative features of one or more aspects.BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The appended figures depict certain features of one or more aspects of the present disclosure and are therefore not to be considered limiting of the scope of this disclosure.

[0011] FIG. 1 depicts an example machine learning model optimization pipeline, according to certain aspects of the present disclosure.

[0012] FIG. 2 depicts an example workflow for quantization-aware training of a machine learning model, according to certain aspects of the present disclosure.

[0013] FIG. 3 depicts an example architecture of a quantization-aware convolutional neural network, with fake quantization nodes, according to aspects of the present disclosure.

[0014] FIG. 4A depicts an example output generated by a neural network, in one example use case.

[0015] FIG. 4B depicts an example output generated by a neural network including a trained bias fake quantization node and a trained output fake quantization node, in the same use case as FIG. 4A.

[0016] FIG. 5 is a flow diagram depicting an example method for performing an inference with a quantization-aware-trained neural network, according to aspects of the present disclosure.

[0017] FIG. 6 is a flow diagram depicting an example method for training a neural network using quantization-aware training with fake quantization nodes, according to aspects of the present disclosure.

[0018] FIG. 7 illustrates an example processing system configured to perform various aspects of the present disclosure.

[0019] To facilitate understanding, identical reference numerals have been used, where possible, to designate identical elements that are common to the drawings. It is contemplated that elements and features of one aspect may be beneficially incorporated in other aspects without further recitation.DETAILED DESCRIPTION

[0020] Aspects of the present disclosure provide techniques and apparatus for improving accuracy of quantization-aware neural networks using fake quantization nodes. As used herein, “fake quantization nodes” generally refer to nodes in a neural network that simulate the effects of quantization on various inputs and / or outputs within the neural network to improve the accuracy of a neural network when operating on quantized data (e.g., data using lower-precision data types than that used to train the neural network) . Fake quantization nodes may also be referred to as “simulated quantization nodes, ” “mock quantization nodes, ” and the like.

[0021] Quantization is a technique that can be applied to a neural network to reduce the model size, improve latency, and make the model more portable. However, the tradeoff for these benefits is reduced inference accuracy. To reduce the model size, quantization discretizes higher precision values into lower precision values, so the values are represented by fewer bits of data and the model as a whole is smaller. Some neural networks may be wholly or partially trained using a floating-point data format, such as a 32-bit floating-point format (sometimes called “FP32” or “float32” ) where 32 bits in  computer memory are used to store a floating-point numeric value (e.g., formatted according to the IEEE 754 standard) . However, when quantizing the neural network, the float32 values are converted into a format that uses fewer bits in computer memory and / or into a format that involves less computational complexity (e.g., from floating-point to fixed-point data or from a larger bit size to a smaller bit size) . In doing this conversion, some bits of data from the floating-point values are inevitably lost, causing reduced accuracy of numerical calculations.

[0022] To achieve the benefits of quantization without significantly degrading the accuracy benefits of floating-point values, quantization-aware training can be used to train the model to reduce or eliminate the error that can arise when higher precision data is converted to lower precision data during inference operations.

[0023] Quantization-aware training emulates inference-time quantization by simulating a model that downstream tools may use with the lower precision format to represent values. By representing weights in 8-bit integer (Int8) format (using 8 bits of computer memory and fixed-point data) , for example, instead of FP32 format (using 32 bits of computer memory and floating-point data) , some resolution is lost. Thus, quantization of a neural network may reduce the precision of the weights, biases, and / or activation values used in the neural network. However, quantization may allow for inference operations to consume fewer computational resources, such as memory storage space, power, and / or processor time, relative to inference operations using unquantized data. Further, with quantization, operations can be redirected to simpler circuitry, thus resulting in even lower power consumption for inference operations using a quantization-aware model. For example, quantizing floating-point data to fixed-point data may allow for inference operations to be performed on simpler arithmetic and logic units (ALUs) of a processor instead of using more complex floating-point units (FPUs) having higher power consumption properties.

[0024] When a neural network is trained with higher precision floating-point values, but then subsequently deployed for use with quantized data, the model may output a value during inference that is different than the expected output from training. While this difference in output values may be a fractional difference, such a difference may be significant in some applications.

[0025] Quantization-aware training applied to a trained neural network can reduce the differences between the expected and observed outputs of a trained neural network. In particular, in a convolutional neural network, if a convolutional layer can be accurately simulated during quantization-aware training, then the overall inference accuracy of the neural network is increased. However, typical quantization-aware training methods may not eliminate the differences between the expected and observed outputs of the quantization-aware-trained neural network entirely.

[0026] Aspects of the present disclosure provide for the training and use of an output fake quantization node, in addition to other fake quantization nodes generated during quantization-aware training of a machine learning model. In some examples, a bias fake quantization node can also be trained for a neural network with a bias layer. These fake quantization nodes can be trained during a quantization-aware training process, to more accurately predict an inference-time output of the neural network when operating on quantized hardware. Thus, even though at least some of the layers of the neural network are trained with higher precision data, the neural network can operate on quantized hardware using lower precision data, while minimizing, or at least reducing, accuracy loss.

[0027] Example Quantization Optimization Pipeline

[0028] FIG. 1 depicts an example machine learning model optimization pipeline 100, according to aspects of the present disclosure. In pipeline 100, a trained machine learning model, referred to in FIG. 1 as trained model 105, is input into a model optimizer 110. While the term “trained model” is used herein for simplicity, the model may actually be only partially trained, or even untrained in some examples. Trained model 105 may be any trained machine learning model suitable for optimization. In some aspects, trained model 105 is a convolutional neural network with one or more convolutional layers. The trained model 105 may have data expressed in a high-precision data format, such as float32 or some other large-bit-size floating-point format, in at least one of the convolutional layers.

[0029] Model optimizer 110 receives trained model 105 in pipeline 100, and performs one or more optimizations on the trained model 105 via one or more algorithms. In some aspects, model optimizer 110 uses various tools to optimize trained machine learning models. Optimizations may improve the accuracy of the models and / or reduce the amount  of computational resources used by the models. Smaller models and / or models that use lower-complexity data types generally translate into improved run-time performance and lower latency, as well as lower compute, memory, and power consumption.

[0030] Developers of machine learning models can utilize one or more tools in model optimizer 110 to automate optimization of trained models. Automating these algorithms maintains task accuracy while also helping to eliminate the use of hand-optimizing neural networks that can be time-consuming, error-prone, and difficult to repeat.

[0031] Model optimizer 110 may provide one or more software tools to optimize trained model 105 via one or more compression operations 115, and / or one or more quantization operations 120. Quantization operations 120 may be post-training quantization and / or quantization-aware training. As discussed herein, quantization is a conversion technique for converting higher precision data into lower precision data, to reduce the model size. For example, quantization may convert larger-bit-size floating-point data into smaller-bit-size floating-point data or may convert floating-point data into fixed-point data (using the same or smaller bit size) . Post-training quantization performs this conversion after a model is trained, during the inference stage. In contrast, quantization-aware training emulates inference-time quantization by training a model to account for downstream tools that will be used to produce the quantized model with a lower precision format to represent values. Thus, with quantization-aware training, a model previously trained based on higher precision data is further trained to adjust for the error that occurs with the loss of precision from quantization.

[0032] While only compression operations 115 and quantization operations 120 are depicted in model optimizer 110 for simplicity, there may be other types of software tools available as part of the model optimizer 110 in other aspects.

[0033] After application of quantization operations 120, including quantization-aware training, a trained optimized model 125 is generated. While not depicted in FIG. 1, additional model optimizations or training processes may also be present in pipeline 100. The final model may then be deployed for use on proprietary hardware, or a user device 130. In various aspects, user device 130 may include: a cellular phone, a smartphone, laptop, personal digital assistant (PDA) , satellite radio, global positioning system (GPS) , multimedia device, video device, digital audio player, camera, game console, tablet, smart device, wearable device, vehicle, utility meter, gas pump, appliance,  healthcare device, implant, sensor / actuator, display, internet of things (IoT) devices, always-on (AON) devices, edge processing devices, or other similar devices. Proprietary hardware may consist of any processor, including a digital signal processor.

[0034] FIG. 2 depicts an example workflow 200 for quantization of a machine learning model. In workflow 200, a user may train a machine learning model, using higher precision data for at least part of the model. The trained model 205 may correspond to trained model 105 of FIG. 1. In some aspects, the trained model 205 is trained using PyTorch or TensorFlow with 32-bit floating-point (FP32) weights or weights stored in some other high-precision data format (e.g., float64 (also known as “double-precision floating point” ) , float128 (also known as “quadruple-precision floating point” or “long double” ) , or the like) .

[0035] The trained model 205 is then input into a model optimizer 210 for optimization. In some aspects, model optimizer 210 may correspond to model optimizer 110 of FIG. 1. As discussed herein, model optimizer 210 uses various software tools for optimizing trained model 205, including quantization operations. Quantization operations may include quantization-aware training 220, and optionally post-training quantization 215 as well. While not expressly depicted in FIG. 2, model optimizer 210 may provide other optimization tools in addition to these, in other aspects.

[0036] In some aspects, unlabeled data samples can be input into post-training quantization 215 algorithm (s) . Post-training techniques such as cross-layer equalization (CLE) and adaptive rounding can be used with the unlabeled data to provide good performance for some models without the use of manual model fine-tuning, thus avoiding the time and effort for hyperparameter tuning and training. Using quantization simulation, the model optimizer 210 evaluates model accuracy, which provides an estimate of expected performance when running quantized inference on target data.

[0037] In some aspects, quantization-aware training 220 algorithm (s) are applied to trained model 205 either directly, or after post-training quantization 215. In quantization-aware training, the machine learning model is further trained to improve quantization performance by simulating quantization noise and adapting model parameters to combat this noise. Generally, during quantization-aware training 220, one or more fake quantization nodes may be added at various locations within the trained model 205 to apply corrections to various inputs and / or outputs of the trained model 205 or portions  thereof to account for losses in model accuracy caused by quantization from higher-precision data types to lower-precision data types. In typical quantization-aware training of a machine learning model, these corrections may include the addition of various fake quantization nodes, such as input and weight fake quantization nodes that apply various corrections to quantized inputs and quantized weights, respectively, used by convolutional layers in a convolutional neural network to generate an output. As used herein, a fake quantization node is a node inserted into a model during quantization-aware training, to simulate an accuracy loss from quantization, and minimize (or at least reduce) the simulated accuracy loss using a loss function. Aspects of the present disclosure, as discussed in further detail below, add additional fake quantization nodes, such as an output fake quantization node and / or a bias fake quantization node, to further improve the performance of quantized models when deployed in a production environment. These additional fake quantization nodes may be added to various layers in a neural network, as discussed in further detail herein.

[0038] The quantized trained model is then exported by the model optimizer 210 at block 225. In some aspects, the quantized trained model can be exported as a machine learning model 230 and quantization encodings 235. The model 230 may be a typical TensorFlow or PyTorch model. Quantization encodings 235 may be implemented, for example, as a JSON (JavaScript Object Notation) file containing recommended quantization encodings.

[0039] Outputs of model 230 and quantization encodings 235 may then be input into a model converter 240. Model converter 240 may be a model conversion software tool that converts the model 230 to a proprietary format, using the quantization encodings 235, for execution on a proprietary artificial intelligence (AI) engine operating on hardware.

[0040] The converted model may then be deployed on target hardware via model deployer 245. In one aspect, the target hardware is a digital signal processor chip. In another aspect, the target hardware is a user device, such as user device 130 of FIG. 1.

[0041] Example Architecture for a Quantization-Aware Neural Network

[0042] FIG. 3 depicts an example architecture 300 of a quantization-aware convolutional neural network, with fake quantization nodes. With fake quantization nodes, the rounding effect of quantization is simulated in the forward pass, as such rounding effects would occur in actual inference operations using quantized data. This  allows for fine-tuning of weights and / or biases to adjust for precision loss that typically occurs with quantization, while still storing quantities in the higher precision format during training. Thus, the fake quantization node continues to store data in the higher precision format while simulating how the model would generate inferences using lower precision data. With the example architecture 300, there is reduced accuracy loss of the convolutional layer (s) when deploying the trained convolutional neural network to hardware, by simulating the hardware rounding / clamp behavior in fake quantization nodes.

[0043] As illustrated, an Input FakeQuant node 310 and a Weight FakeQuant node 320 are applied to the input of the neural network. Input FakeQuant node 310 and Weight FakeQuant node 320 are fake quantization nodes of the convolutional neural network. These nodes 310, 320 may be implemented as functions that simulate the effects of quantization on the input values. In some aspects, Input FakeQuant node 310 is applied to input data and encodings. Input data may be a single value, or an array of data. In FIG. 3, Input FakeQuant node 310 has two encodings: a scale value 312 and an offset value 314. Scale value 312 and offset value 314 are quantization parameters generated by a quantization tool to discrete floating-point values. In one aspect, a float value is equal to a scale value multiplied by a sum of a quantized value and offset. That is, a floating-point value Nfloat may be defined by the equation: Nfloat=scale× (Nquantized+offset) , where Nquantized represents the quantized value of Nfloat.

[0044] In some examples, the scale value 312 and offset value 314 are trainable parameters for the convolutional neural network that are further trained during quantization-aware training. In other examples, the scale value 312 and offset value 314 are fixed for the quantization-aware training process.

[0045] Similarly, Weight FakeQuant node 320 is applied to weight data and encodings. The weight data may be a single value, or an array of data. In FIG. 3, Weight FakeQuant node 320 has two encodings: a scale value 322 and an offset value 324. As discussed above with respect to Input FakeQuant node 310, the scale value 322 and offset value 324 are quantization parameters generated by a quantization tool to discrete floating-point values. The offset value 324 represents an amount of bias to adjust the calculations performed by the particular node for the layer of the neural network. In some examples, the scale value 322 and offset value 324 are trainable parameters for the convolutional neural network that are further trained during quantization-aware training.  In other examples, the scale value 322 and offset value 324 are fixed parameters for the quantization-aware training process.

[0046] Outputs of the fake quantization nodes, Input FakeQuant node 310 and Weight FakeQuant node 320, are input into convolutional layer 330, which is a convolutional layer of the convolutional neural network. While not expressly depicted in FIG. 3, the convolutional layer 330 may comprise multiple layers and nodes. The convolutional layer 330 may perform convolution operations to multiply input data and weight data to generate an output. In some aspects, the convolutional layer 330 performs convolution operations to produce an output activation, with each value generated by multiplying an input (e.g., an output of Input FakeQuant node 310) and weight data (e.g., an output of Weight FakeQuant node 320) .

[0047] In some aspects, an output of convolutional layer 330 is input into bias layer 340, which is a bias layer of the convolutional neural network. While not expressly depicted in FIG. 3, bias layer 340 may comprise one or more individual nodes. Bias layer 340 may provide a constant which is added to the output of convolutional layer 330 to offset the result, and helps shift the activation function towards the positive or negative side. Some aspects of the quantization-aware convolutional neural network of the present disclosure may not have a bias layer 340, in which case an output of convolutional layer 330 is input directly into activation layer 360.

[0048] When bias layer 340 is present in the quantization-aware convolutional neural network, a Bias FakeQuant node 350, which is a fake quantization node, may also be trained during a quantization-aware training process for the neural network. The Bias FakeQuant node 350 may be trained to adjust a bias layer value, to accommodate for the precision loss that occurs with quantization, while continuing to maintain accuracy of the overall neural network. An output of the trained Bias FakeQuant node 350 may be added to bias layer 340 during inference-time operation of the neural network. The Bias FakeQuant node 350 trained during quantization-aware training of the artificial neural network may adjust a bias value generated by the bias layer 340, to improve accuracy when the artificial neural network is operated during inference time on quantized hardware.

[0049] In some examples, Bias FakeQuant node 350 performs the following operation when trained to execute using quantization into 8-bit fixed-point format data:

[0050] where Bias is a value from the bias layer of the neural network, I. scale is an input scaling value, W. scale is a weight scaling value, clamp_int64 is a function restricting an output to a range based an output of a rounding function generated based on the Bias, I. scale, and W. scale terms, and Bias FakeQuant represents a result of applying fake quantization to the value from the bias layer of the neural network.

[0051] In other examples, Bias FakeQuant node 350 performs the following operation when trained to execute using quantization into 16-bit fixed-point format:

[0052] where Bias is a value from the bias layer of the neural network, I. scale is an input scaling value, W. scale is a weight scaling value, clamp_int64 is a function restricting an output to a range based an output of a rounding function generated based on the Bias, I. scale, and W. scale terms, and Bias FakeQuant represents a result of applying fake quantization to the value from the bias layer of the neural network.

[0053] An output of the bias layer 340 may be input into an activation layer 360, which performs an activation function for the neural network. In some aspects, activation layer 360 is a rectified linear unit (ReLU) layer, which may perform a linear function that outputs the input directly if the input is positive. Otherwise, the ReLU activation layer may output a zero. The usage of ReLU helps to prevent the exponential growth in the computation required to operate the neural network. In other aspects, activation layer 360 is a ReLU6 layer, which is a ReLU layer that limits the activation to a maximum size of six. By bounding the upper limit to 6, the activation operation allows for more float positions, and is thus more precise.

[0054] An output of the activation layer 360 is input into Output FakeQuant node 370, which is a fake quantization node that is trained during the quantization-aware training process for the neural network. The Output FakeQuant node 370 is trained to adjust an output value from the activation layer 360, to accommodate for the precision loss that occurs with quantization, while continuing to maintain accuracy of the overall neural network. An output of the trained Output FakeQuant node 370 is added to an  output of activation layer 360 during inference-time operation of the neural network. The Output FakeQuant node 370 trained during quantization-aware training of the artificial neural network adjusts an output value, to improve accuracy when the artificial neural network is operated during inference time on quantized hardware.

[0055] As illustrated in FIG. 3, Output FakeQuant node 370 has two encodings: a scale value 372 and an offset value 374. In some examples, the scale value 372 and offset value 374 are trainable parameters for the convolutional neural network that are further trained during quantization-aware training. In other examples, the scale value 372 and offset value 374 are fixed parameters for a quantization-aware training process.

[0056] In some examples, Output FakeQuant node 370 performs the following operation when trained to execute using quantization into a 16-bit fixed-point format:

[0057] where Output is a value from the generated output of the activation layer of the neural network based on the generated biased output, I. scale is an input scaling value, W. scale is an output scaling value, and Output FakeQuant represents a result of applying fake quantization to the output of the activation layer of the neural network.

[0058] In other examples, Output FakeQuant node 370 performs the following operation when trained to execute using quantization into an 8-bit fixed-point format:

[0059] where Output is a value from the generated output of the activation layer of the neural network based on the generated biased output, I. scale is an input scaling value, W. scale is an output scaling value, and Output FakeQuant represents a result of applying fake quantization to the output of the activation layer of the neural network.

[0060] Further, Output FakeQuant node 370 may perform the following operation to generate a scaling value for the output fake quantization node, the scaling value generated according to the expression:

[0061] where I. scale is an input scaling value, W. scale is a weight scaling value, O. scale is a scaling value from the generated output of the activation layer of the neural network based on the generated biased output, and scale represents the scaling value for the output fake quantization node.

[0062] While the example architecture 300 is depicted in FIG. 3 with these specific nodes, there may actually be fewer or additional nodes in other aspects. That is, in one example aspect, architecture 300 may include Input FakeQuant node 310, Weight FakeQuant node 320, convolutional layer 330, and Output FakeQuant node 370 in a quantization-aware convolutional neural network. In another example aspect, architecture 300 may include Input FakeQuant node 310, Weight FakeQuant node 320, convolutional layer 330, bias layer 340, Bias FakeQuant node 350, and Output FakeQuant node 370. In a further example aspect, architecture 300 may include Input FakeQuant node 310, Weight FakeQuant node 320, convolutional layer 330, activation layer 360, and Output FakeQuant node 370.

[0063] Example Use Case

[0064] FIG. 4A depicts a difference between expected and actual outputs generated by a quantization-aware neural network without a bias fake quantization node or an output fake quantization node. In FIG. 4A, an input data array is input into an input node of the neural network. While the input data array illustrated in FIG. 4A is a 3x3 array, it should be recognized that the input data array may be of any size and include any number of dimensions. In some examples, Input FakeQuant node 310 of FIG. 3 is applied to the input data and encodings. Similarly, a weight node of the neural network is applied to the 3x3 weight data array of FIG. 4A. In some examples, Weight FakeQuant node 320 of FIG. 3 is applied to the weight data and encodings.

[0065] As illustrated in FIG. 4A, a bias value of 3.30795931 is used in bias layer 340. After refining the neural network using quantization-aware training for the neural network, the trained output value is 2.71988474. However, upon deployment of the neural network in quantized hardware operating in a 16-bit format, the deployed output value is not the same as the trained output value. That is, the deployed output value is 2.71595331. Despite the neural network being optimized with quantization-aware training, when the trained neural network is deployed, the output on the hardware is different from an expected output for the neural network.

[0066] FIG. 4B depicts an example output generated by a quantization-aware neural network including a trained bias fake quantization node and a trained output fake quantization node. In FIG. 4B, the same input values and weight values are used as in the example illustrated in FIG. 4A. As discussed above with respect to FIG. 3, the scale and offset variable values depicted in FIGs. 4A and 4B are quantization parameters generated by a quantization tool to discretize floating-point values. However, the addition of a bias fake quantization node, such as Bias FakeQuant node 350 of FIG. 3, alters the bias value applied to the model. The Output FakeQuant node 370 may further adjust the neural network calculations, such that the trained output of 2.71595331 matches, or at least minimizes a delta between, the output received when the model is deployed in hardware operating on data quantized to a 16-bit format and the expected output. As such, by introducing the bias fake quantization node and the output fake quantization node into the quantization-aware neural network, the accuracy of the trained neural network is maintained in deployed hardware.

[0067] Example Methods

[0068] FIG. 5 is a flow diagram depicting an example method 500 for performing an inference with a quantization-aware-trained neural network, according to aspects of the present disclosure. The method can be performed with a convolutional neural network, such as that depicted in FIG. 3.

[0069] At block 505 of method 500, an inferencing system generates an output of a convolutional layer of a neural network (such as convolutional layer 330 of FIG. 3) based on an input into the neural network (such as from Input FakeQuant node 310 of FIG. 3) . As discussed above with respect to FIG. 3, the input may include a data array and one or more encodings for quantization. Further, the input to the convolutional layer may also include weight data and one or more encodings for quantization, such as depicted in Weight FakeQuant node 320 of FIG. 3. In some aspects, the inferencing system generates the output of the convolutional layer of the neural network from an input fake quantization node and a weight fake quantization node.

[0070] In some aspects where the convolutional neural network has a bias layer, the inferencing system generates a biased output through a bias layer of the neural network (such as bias layer 340 of FIG. 3) and a bias fake quantization node (such as Bias FakeQuant node 350 of FIG. 3) that is applied to the bias layer of the neural network. The  bias fake quantization node of the neural network emulates quantization into lower precision fixed-point data for the neural network, even though at least a portion of the neural network was trained based on higher precision floating-point data.

[0071] The higher precision floating-point data may be 32-bit floating-point data (i.e., FP32) . In one aspect, the quantization into the lower precision fixed-point data is quantization from 32-bit floating-point data to 8-bit fixed-point data. In another aspect, the quantization into the lower precision fixed-point data is quantization from 32-bit floating-point data to 16-bit fixed-point data. In some aspects, the inferencing system generates a biased output through the bias layer of the neural network and a bias fake quantization node applied to the bias layer of the neural layer, in accordance with the equations discussed above in reference to FIG. 3.

[0072] At block 510, the inferencing system generates an output of an activation layer of the neural network (such as activation layer 360 of FIG. 3) based on the generated output of the convolutional layer from block 505. At block 515, the inferencing system generates an output of the neural network (such as from Output FakeQuant node 370 of FIG. 3) based on the output of the activation layer. In some aspects, the inferencing system generates the output of the neural network based on the output of the activation layer of the neural network and the output fake quantization node in the neural network, in accordance with the equations discussed above in reference to FIG. 3. Further, the inferencing system may generate a scaling value for the output fake quantization node, in accordance with the equation discussed above in reference to FIG. 3.

[0073] Finally, at block 520, the inferencing system takes one or more actions based on the generated output of the neural network. The one or more actions may include deploying the neural network onto proprietary hardware, such as a digital signal processor, or onto a user device (such as user device 130 of FIG. 1) .

[0074] FIG. 6 is a flow diagram depicting an example method 600 for training a neural network using quantization-aware training with fake quantization nodes. In some aspects, the method 600 provides additional detail for the pipeline 100 of FIG. 1 and the workflow 200 of FIG. 2. In some aspects, the method 600 is performed to provide offline training of one or more neural networks, such as by a training device or system.

[0075] At block 605, the training system receives a trained neural network (such as trained model 105 of FIG. 1) for quantization-aware training. In some aspects, the trained  neural network includes one or more convolutional layers. The training system may be a part of model optimizer 110 of FIG. 1. The training system determines, identifies, receives, or otherwise accesses a quantization-aware training sample.

[0076] At block 610, the training system retrains the received neural network via quantization-aware training based on a plurality of fake quantization nodes attached to one or more layers of the neural network. The quantization-aware training of the neural network emulates quantization into lower precision fixed-point data for the neural network, even though at least a portion of the trained neural network was trained based on higher precision floating-point data. The higher precision floating-point data may be 32-bit floating-point data (i.e., FP32) . In one aspect, the quantization into the lower precision fixed-point data is quantization from 32-bit floating-point data to 8-bit fixed-point data. In another aspect, the quantization into the lower precision fixed-point data is quantization from 32-bit floating-point data to 16-bit fixed-point data.

[0077] As discussed herein, the fake quantization nodes may include an input fake quantization node, a weight fake quantization node, and one or more of a bias fake quantization node and an output fake quantization node. With this retraining, the neural network is further trained to perform accurate calculations in any one or more of 8-bit, 10-bit, or 16-bit format.

[0078] In some aspects, retraining the neural network comprises training a bias fake quantization node to be applied to a bias layer operating on an output of at least one of the one or more convolutional layers of the neural network. The output fake quantization node operates on an output of an activation function in the neural network.

[0079] At optional block 615, the training system deploys the retrained neural network to a hardware device, such as proprietary hardware, or a user device (e.g., user device 130 of FIG. 1) .

[0080] Example Processing System

[0081] In some aspects, the workflows, techniques, and methods described with reference to FIGS. 1-6 may be implemented on one or more devices or systems. FIG. 7 depicts an example processing system 700 configured to perform various aspects of the present disclosure, including, for example, the techniques and methods described with respect to FIGS. 1-6. In one aspect, the processing system 700 may correspond to a computing system that trains machine learning models (e.g., a training system) and / or to  a computing system that uses the trained models for inferencing (e.g., an inferencing system) .

[0082] In some aspects, the processing system 700 corresponds to a base station and / or to user equipment engaged in wireless communication. Although depicted as a single system for conceptual clarity, in at least some aspects, as discussed above, the operations described below with respect to the processing system 700 may be distributed across any number of devices. For example, a first system may train the model (s) while a second system uses the trained models to generate channel estimations (and take an action based thereon) .

[0083] Processing system 700 includes a central processing unit (CPU) 702, which in some examples may be a multi-core CPU. Instructions executed at the CPU 702 may be loaded, for example, from a program memory associated with the CPU 702 or may be loaded from a memory 724.

[0084] Processing system 700 also includes additional processing components tailored to specific functions, such as a graphics processing unit (GPU) 704, a digital signal processor (DSP) 706, a neural processing unit (NPU) 708, a multimedia processing unit 710, and a wireless connectivity component 712.

[0085] An NPU, such as NPU 708, is generally a specialized circuit configured for implementing the control and arithmetic logic for executing machine learning algorithms, such as algorithms for processing artificial neural networks (ANNs) , deep neural networks (DNNs) , random forests (RFs) , and the like. An NPU may sometimes alternatively be referred to as a neural signal processor (NSP) , tensor processing unit (TPU) , neural network processor (NNP) , intelligence processing unit (IPU) , vision processing unit (VPU) , or graph processing unit.

[0086] NPUs, such as NPU 708, are configured to accelerate the performance of common machine learning tasks, such as image classification, machine translation, object detection, and various other predictive models. In some examples, a plurality of NPUs may be instantiated on a single chip, such as a system-on-a-chip (SoC) , while in other examples, the NPUs may be part of a dedicated neural-network accelerator.

[0087] NPUs may be optimized for training or inference, or in some cases configured to balance performance between both. For NPUs that are capable of performing both training and inference, the two tasks may still generally be performed independently.

[0088] NPUs designed to accelerate training are generally configured to accelerate the optimization of new models, which is a highly compute-intensive operation that involves inputting an existing dataset (often labeled or tagged) , iterating over the dataset, and then adjusting model parameters, such as weights and / or biases, in order to improve model performance. Generally, optimizing based on a wrong prediction involves propagating back through the layers of the model and determining gradients to reduce the prediction error.

[0089] NPUs designed to accelerate inference are generally configured to operate on complete models. Such NPUs may thus be configured to input a new piece of data and rapidly process this piece of data through an already trained model to generate a model output (e.g., an inference) .

[0090] In one implementation, NPU 708 is a part of one or more of CPU 702, GPU 704, and / or DSP 706.

[0091] In some examples, wireless connectivity component 712 may include subcomponents, for example, for third generation (3G) connectivity, fourth generation (4G) connectivity (e.g., 4G LTE) , fifth generation connectivity (e.g., 5G or NR) , Wi-Fi connectivity, Bluetooth connectivity, and / or other wireless data transmission technologies. Wireless connectivity component 712 is further coupled to one or more antennas 714.

[0092] Processing system 700 may also include one or more sensor processing units 716 associated with any manner of sensor, one or more image signal processors (ISPs) 718 associated with any manner of image sensor, and / or a navigation processor 720, which may include satellite-based positioning system components (e.g., GPS or GLONASS) as well as inertial positioning system components.

[0093] Processing system 700 may also include one or more input and / or output devices 722, such as screens, touch-sensitive surfaces (including touch-sensitive displays) , physical buttons, speakers, microphones, and the like.

[0094] In some examples, one or more of the processors of processing system 700 may be based on an ARM or RISC-V instruction set.

[0095] Processing system 700 also includes memory 724, which is representative of one or more static and / or dynamic memories, such as a dynamic random access memory, a flash-based static memory, and the like. In this example, memory 724 includes  computer-executable components, which may be executed by one or more of the aforementioned processors of processing system 700.

[0096] In particular, in this example, memory 724 includes quantization component 724A, update component 724B, inference component 724C, and a training component 724D. The memory 724 also includes a set of training data 724E and model parameters 724F. The model parameters 724F may generally correspond to the parameters of all or a part of a machine learning model trained with quantization-aware training, such as one or more scale values, offset values, weights, and biases used for one or more layers of a neural network, as discussed above. The training data 724E generally corresponds to the training samples or exemplars discussed above, for training the underlying model (such as the training samples used to generate trained model 105 of FIG. 1 and trained model 205 of FIG. 2) , and / or training samples used for the quantization-aware training. The depicted components, and others not depicted, may be configured to perform various aspects of the techniques described herein. Though depicted as discrete components for conceptual clarity in FIG. 7, quantization component 724A, update component 724B, inference component 724C, and training component 724D may be collectively or individually implemented in various aspects.

[0097] Processing system 700 further comprises quantization circuit 726, update circuit 727, inference circuit 728, and training circuit 729. The depicted circuits, and others not depicted, may be configured to perform various aspects of the techniques described herein.

[0098] For example, quantization component 724A and quantization circuit 726 may be used for quantization-aware training of the neural network, as discussed above with reference to FIGS. 1-6. Update component 724B and update circuit 727 may be used to generate values for updating the quantization-aware training, such as for training the bias and / or output fake quantization nodes, as part of one or more layers of a neural network, as discussed above with reference to FIGS. 3-6. Inference component 724C and inference circuit 728 may be used to orchestrate the processing of data in the neural network and / or to generate the final output of the neural network (during training and / or during inferencing) , as discussed above with reference to FIGS. 1-6. Training component 724D and training circuit 729 may be used to compute losses and / or to refine the machine learning model, as discussed above with reference to FIGS. 1-6.

[0099] Though depicted as separate components and circuits for clarity in FIG. 7, quantization circuit 726, update circuit 727, inference circuit 728, and training circuit 729 may collectively or individually be implemented in other processing devices of processing system 700, such as within CPU 702, GPU 704, DSP 706, NPU 708, and the like.

[0100] Generally, processing system 700 and / or components thereof may be configured to perform the methods described herein.

[0101] Notably, in other aspects, aspects of processing system 700 may be omitted, such as where processing system 700 is a server computer or the like. For example, multimedia processing unit 710, wireless connectivity component 712, sensor processing units 716, ISPs 718, and / or navigation processor 720 may be omitted in other aspects. Further, aspects of processing system 700 may be distributed between multiple devices, such as one device for training a model and a second device to generate inferences.

[0102] Example Clauses

[0103] Implementation examples are described in the following numbered clauses:

[0104] Clause 1: A processor-implemented method, comprising: generating an output of a convolutional layer of a neural network based on an input into the neural network; generating an output of an activation layer of the neural network based on the generated output of the convolutional layer; generating an output of the neural network based on the output of the activation layer and an output fake quantization node applied to the output of the activation layer; and taking one or more actions based on the generated output of the neural network.

[0105] Clause 2: The method of Clause 1, wherein the generating the output of the convolutional layer of the neural network comprises generating an output from an input fake quantization node and a weight fake quantization node.

[0106] Clause 3: The method of Clause 1 or 2, wherein the output fake quantization node of the neural network emulates quantization into lower-precision fixed-point data for the neural network, and wherein at least a portion of the neural network was trained based on higher-precision floating-point data.

[0107] Clause 4: The method of Clause 3, wherein the higher-precision floating-point data comprises 32-bit floating-point data, and wherein the quantization into the lower- precision fixed-point data comprises quantization from 32-bit floating-point data to 8-bit fixed-point data.

[0108] Clause 5: The method of Clause 3, wherein the higher-precision floating-point data comprises 32-bit floating-point data, and wherein the quantization into the lower-precision fixed-point data comprises quantization from 32-bit floating-point data to 16-bit fixed-point data.

[0109] Clause 6: The method of Clause 1, wherein the generating the output of the neural network based on the output of the activation layer of the neural network and the output fake quantization node in the neural network is performed according to Output where Output is a value from the generated output of the activation layer of the neural network based on the generated biased output, I. scale is an input scaling value, W. scale is an output scaling value, and Output FakeQuant represents a result of applying fake quantization to the output of the activation layer of the neural network.

[0110] Clause 7: The method of Clause 1, wherein the generating the output of the neural network based on the output of the activation layer of the neural network and the output fake quantization node in the neural network comprises generating a scaling value for the output fake quantization node, the scaling value being generated according to:  where I. scale is an input scaling value, W. scale is a weight scaling value, O. scale is a scaling value from the generated output of the activation layer of the neural network based on the generated biased output, and scale represents the scaling value for the output fake quantization node.

[0111] Clause 8: The method of any of Clauses 1 through 7, further comprising generating a biased output through a bias layer of the neural network and a bias fake quantization node applied to the bias layer of the neural network.

[0112] Clause 9: The method of Clause 8, wherein the generating the biased output through the bias layer of the neural network and the bias fake quantization node applied to the bias layer of the neural network is performed according to Bias where Bias is a value from the bias layer of the neural network, I. scale is an input scaling value, W. scale is a weight scaling value, clamp_int64 is a function restricting an output to a range based an  output of a rounding function generated based on the Bias, I. scale, and W. scale terms, and Bias FakeQuant represents a result of applying fake quantization to the value from the bias layer of the neural network.

[0113] Clause 10: The method of any of Clauses 1 through 9, wherein the taking the one or more actions based on the generated output comprises comparing performance of the neural network relative to performance of the neural network on a digital signal processor.

[0114] Clause 11: A processor-implemented method, comprising: receiving a trained neural network for quantization-aware training; and retraining the neural network via quantization-aware training based on a plurality of fake quantization nodes attached to one or more layers of the neural network, wherein the plurality of fake quantization nodes includes at least an output fake quantization node.

[0115] Clause 12: The method of Clause 11, wherein the neural network includes one or more convolutional layers.

[0116] Clause 13: The method of any of Clauses 11 through 12, wherein the plurality of fake quantization nodes further comprises a bias fake quantization node.

[0117] Clause 14: The method of Clause 13, wherein retraining the neural network further comprises training the bias fake quantization node to be applied to a bias layer operating on an output of at least one of the one or more convolutional layers.

[0118] Clause 15: The method of Clause 14, wherein the output fake quantization node operates on an output of an activation function in the neural network.

[0119] Clause 16: The method of any of Clauses 11 through 15, wherein the quantization-aware training of the neural network emulates quantization into lower-precision fixed-point data for the neural network, and wherein at least a portion of the trained neural network was trained based on higher-precision floating-point data.

[0120] Clause 17: The method of Clause 16, wherein the higher-precision floating-point data comprises 32-bit floating-point data, and wherein the quantization into the lower-precision fixed-point quantization comprises quantization from 32-bit floating-point data to 8-bit fixed-point data.

[0121] Clause 18: The method of Clause 16, wherein the higher-precision floating-point data comprises 32-bit floating-point data, and wherein the quantization into the  lower-precision fixed-point data comprises quantization from 32-bit floating-point data to 16-bit fixed-point data.

[0122] Clause 19: The method of any of Clauses 11 through 18, further comprising deploying the retrained neural network to a client device.

[0123] Clause 20: A system comprising: a memory having executable instructions stored thereon; and a processor configured to execute the executable instructions in order to cause the system to perform a method in accordance with any of Clauses 1-19.

[0124] Clause 21: A system, comprising means for performing a method in accordance with any of Clauses 1-19.

[0125] Clause 22: A non-transitory computer-readable medium having instructions stored thereon which, when executed by a processor, cause the processor to perform a method in accordance with any of Clauses 1-19.

[0126] Clause 23: A computer program product embodied on a computer-readable storage medium comprising code for performing a method in accordance with any of Clauses 1-19.

[0127] Additional Considerations

[0128] The preceding description is provided to enable any person skilled in the art to practice the various aspects described herein. The examples discussed herein are not limiting of the scope, applicability, or aspects set forth in the claims. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects. For example, changes may be made in the function and arrangement of elements discussed without departing from the scope of the disclosure. Various examples may omit, substitute, or add various procedures or components as appropriate. For instance, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Also, features described with respect to some examples may be combined in some other examples. For example, an apparatus may be implemented or a method may be practiced using any number of the aspects set forth herein. In addition, the scope of the disclosure is intended to cover such an apparatus or method that is practiced using other structure, functionality, or structure and functionality in addition to, or other than, the various aspects of the disclosure set forth herein. It should be understood  that any aspect of the disclosure disclosed herein may be embodied by one or more elements of a claim.

[0129] As used herein, the word “exemplary” means “serving as an example, instance, or illustration. ” Any aspect described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects.

[0130] As used herein, a phrase referring to “at least one of” a list of items refers to any combination of those items, including single members. As an example, “at least one of: a, b, or c” is intended to cover a, b, c, a-b, a-c, b-c, and a-b-c, as well as any combination with multiples of the same element (e.g., a-a, a-a-a, a-a-b, a-a-c, a-b-b, a-c-c, b-b, b-b-b, b-b-c, c-c, and c-c-c or any other ordering of a, b, and c) .

[0131] As used herein, the term “determining” encompasses a wide variety of actions. For example, “determining” may include calculating, computing, processing, deriving, investigating, looking up (e.g., looking up in a table, a database or another data structure) , ascertaining, and the like. Also, “determining” may include receiving (e.g., receiving information) , accessing (e.g., accessing data in a memory) , and the like. Also, “determining” may include resolving, selecting, choosing, establishing, and the like.

[0132] The methods disclosed herein comprise one or more steps or actions for achieving the methods. The method steps and / or actions may be interchanged with one another without departing from the scope of the claims. In other words, unless a specific order of steps or actions is specified, the order and / or use of specific steps and / or actions may be modified without departing from the scope of the claims. Further, the various operations of methods described above may be performed by any suitable means capable of performing the corresponding functions. The means may include various hardware and / or software component (s) and / or module (s) , including, but not limited to a circuit, an application specific integrated circuit (ASIC) , or processor. Generally, where there are operations illustrated in figures, those operations may have corresponding counterpart means-plus-function components with similar numbering.

[0133] The following claims are not intended to be limited to the aspects shown herein, but are to be accorded the full scope consistent with the language of the claims. Within a claim, reference to an element in the singular is not intended to mean “one and only one” unless specifically so stated, but rather “one or more. ” Unless specifically stated otherwise, the term “some” refers to one or more. No claim element is to be construed  under the provisions of 35 U.S.C. § 112 (f) unless the element is expressly recited using the phrase “means for” or, in the case of a method claim, the element is recited using the phrase “step for. ” All structural and functional equivalents to the elements of the various aspects described throughout this disclosure that are known or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the claims. Moreover, nothing disclosed herein is intended to be dedicated to the public regardless of whether such disclosure is explicitly recited in the claims.

Claims

1.A processor-implemented method comprising:generating an output of a convolutional layer of a neural network based on an input into the neural network;generating an output of an activation layer of the neural network based on the generated output of the convolutional layer;generating an output of the neural network based on the output of the activation layer and an output fake quantization node applied to the output of the activation layer; andtaking one or more actions based on the generated output of the neural network.2.The method of claim 1, wherein the generating the output of the convolutional layer of the neural network comprises generating an output from an input fake quantization node and a weight fake quantization node.3.The method of claim 1, wherein the output fake quantization node of the neural network emulates quantization into lower-precision fixed-point data for the neural network, and wherein at least a portion of the neural network was trained based on higher-precision floating-point data.4.The method of claim 3, wherein the higher-precision floating-point data comprises 32-bit floating-point data, and wherein the quantization into the lower-precision fixed-point data comprises quantization from 32-bit floating-point data to 8-bit fixed-point data.5.The method of claim 3, wherein the higher-precision floating-point data comprises 32-bit floating-point data, and wherein the quantization into the lower-precision fixed-point data comprises quantization from 32-bit floating-point data to 16-bit fixed-point data.6.The method of claim 1, wherein the generating the output of the neural network based on the output of the activation layer of the neural network and the output fake quantization node in the neural network is performed according to: whereOutput is a value from the generated output of the activation layer of the neural network based on the generated biased output,I. scale is an input scaling value,W. scale is an output scaling value, andOutput FakeQuant represents a result of applying fake quantization to the output of the activation layer of the neural network.7.The method of claim 1, wherein the generating the output of the neural network based on the output of the activation layer of the neural network and the output fake quantization node in the neural network comprises generating a scaling value for the output fake quantization node, the scaling value being generated according to: whereI. scale is an input scaling value,W. scale is a weight scaling value,O. scale is a scaling value from the generated output of the activation layer of the neural network based on the generated biased output, andscale represents the scaling value for the output fake quantization node.8.The method of claim 1, further comprising generating a biased output through a bias layer of the neural network and a bias fake quantization node applied to the bias layer of the neural network.9.The method of claim 8, wherein the generating the biased output through the bias layer of the neural network and the bias fake quantization node applied to the bias layer of the neural network is performed according to: whereBias is a value from the bias layer of the neural network,I. scale is an input scaling value,W. scale is a weight scaling value,clamp_int64 is a function restricting an output to a range based an output of a rounding function generated based on the Bias, I. scale, and W. scale terms, andBias FakeQuant represents a result of applying fake quantization to the value from the bias layer of the neural network.10.The method of claim 1, wherein the taking the one or more actions based on the generated output comprises comparing performance of the neural network relative to performance of the neural network on a digital signal processor.11.A processor-implemented method comprising:receiving a trained neural network for quantization-aware training; andretraining the neural network via quantization-aware training based on a plurality of fake quantization nodes attached to one or more layers of the neural network, wherein the plurality of fake quantization nodes includes at least an output fake quantization node.12.The method of claim 11, wherein the neural network includes one or more convolutional layers.13.The method of claim 11, wherein the plurality of fake quantization nodes further comprises a bias fake quantization node.14.The method of claim 13, wherein retraining the neural network further comprises training the bias fake quantization node to be applied to a bias layer operating on an output of at least one of the one or more convolutional layers.15.The method of claim 14, wherein the output fake quantization node operates on an output of an activation function in the neural network.16.The method of claim 11, wherein the quantization-aware training of the neural network emulates quantization into lower-precision fixed-point data for the neural network, and wherein at least a portion of the trained neural network was trained based on higher-precision floating-point data.17.The method of claim 16, wherein the higher-precision floating-point data comprises 32-bit floating-point data, and wherein the quantization into the lower-precision fixed-point quantization comprises quantization from 32-bit floating-point data to 8-bit fixed-point data.18.The method of claim 16, wherein the higher-precision floating-point data comprises 32-bit floating-point data, and wherein the quantization into the lower-precision fixed-point data comprises quantization from 32-bit floating-point data to 16-bit fixed-point data.19.The method of claim 11, further comprising deploying the retrained neural network to a client device.20.A system comprising:a memory having executable instructions stored thereon; anda processor configured to execute the executable instructions in order to cause the system to:generate an output of a convolutional layer of a neural network based on an input into the neural network;generate an output of an activation layer of the neural network based on the generated output of the convolutional layer;generate an output of the neural network based on the output of the activation layer and an output fake quantization node applied to the output of the activation layer; andtake one or more actions based on the generated output of the neural network.21.The system of claim 20, wherein the output fake quantization node of the neural network emulates quantization into lower-precision fixed-point data for the neural network, and wherein at least a portion of the neural network was trained based on higher-precision floating-point data.22.The system of claim 21, wherein the higher-precision floating-point data comprises 32-bit floating-point data, and wherein the quantization into the lower-precision fixed-point data comprises quantization from 32-bit floating-point data to 8-bit fixed-point data.23.The system of claim 21, wherein the higher-precision floating-point data comprises 32-bit floating-point data, and wherein the quantization into the lower-precision fixed-point data comprises quantization from 32-bit floating-point data to 16-bit fixed-point data.24.The system of claim 20, wherein the processor is further configured to cause the system to generate a biased output through a bias layer of the neural network and a bias fake quantization node applied to the bias layer of the neural network.25.The system of claim 20, wherein the processor comprises a digital signal processor and wherein the processor being configured to cause the system to take the one or more actions based on the generated output comprises the digital signal processor being configured to cause the system to compare performance of the neural network relative to performance of the neural network.26.A system comprising:a memory having executable instructions stored thereon; anda processor configured to execute the executable instructions in order to cause the system to:receive a trained neural network for quantization-aware training; andretrain the neural network via quantization-aware training based on a plurality of fake quantization nodes attached to one or more layers of the neural network, wherein the plurality of fake quantization nodes includes at least an output fake quantization node.27.The system of claim 26, wherein the neural network includes one or more convolutional layers.28.The system of claim 26, wherein the plurality of fake quantization nodes further comprises a bias fake quantization node.29.The system of claim 28, wherein the processor being configured to retrain the neural network further comprises the processor being configured to train the bias fake quantization node to be applied to a bias layer operating on an output of at least one of the one or more convolutional layers.30.The system of claim 26, wherein the processor being configured to cause system to retrain the neural network comprises the output fake quantization node being configured to operate on an output of an activation function in the neural network.