Controlling machine learning model resource consumption in vehicle
By replacing the nonlinear operations in the machine learning model with linear operation approximations in the vehicle system, resource consumption is optimized, solving the problem of high resource consumption in the existing technology, improving model performance and accuracy, and is suitable for applications such as autonomous driving.
Patent Information
- Application Number
- CN202410383953.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-04-10
- Filing Date
- 2024-04-01
- Publication Date
- 2024-10-15
AI Technical Summary
Machine learning models used in existing vehicle systems consume high resources, resulting in increased processor power consumption and difficulties in thermal management, which affects model performance and accuracy.
By identifying and replacing nonlinear operations in machine learning models, using less resource-consuming linear operation approximations, optimizing the objective function to select appropriate replacement operations, reducing computing resource consumption and improving model performance.
It effectively reduces the power consumption of vehicle processors and circuits, improves the performance and accuracy of machine learning models, promotes thermal management, and is suitable for applications such as autonomous driving systems and advanced driver assistance systems.
Smart Images

Figure CN118780388A_ABST
Abstract
Description
Background Art
[0001] A vehicle may include a processor and a battery system. The processor of the vehicle may operate the vehicle based on power received from the battery system. Summary of the invention
[0002] The technical solution relates to a technology for controlling (e.g., reducing) machine learning model resource consumption of machine learning models used in vehicle systems (e.g., autonomous driving systems, advanced driver assistance systems (ADAS), collision avoidance systems, lane assistance systems). The solution can identify resource-intensive operations (e.g., nonlinear operations) of the machine learning model and replace the resource-intensive operations with operations that approximate the resource-intensive operations and consume less resources. For example, linear operations can reduce processing resources used to implement nonlinear operations in machine learning models. Because there may be multiple linear approximations for approximating a given nonlinear operation, and each approximation can provide a different level of model accuracy and consume different levels of computing resources, the system can perform experiments, simulations, or optimizations to test operations in the machine learning model. The system can implement an objective function (e.g., a cost function or a loss function) to select a second operation to approximate a first resource-intensive operation. The objective function can be optimized based on an accuracy metric of the model with each second operation and a processing resource metric for each second operation. Based on the optimization, a second operation can be selected. In response to selecting a second operation to replace a first operation, the system can transform the machine learning model into a less computationally intensive model by replacing the first operation with the second operation. The updated model can then be deployed to the vehicle for execution or implementation.
[0003] At least one aspect relates to a system. The system may include a data processing system. The data processing system may include a memory device coupled to one or more processors. The data processing system may receive a model including a first operation trained by machine learning, the model being used to generate an output for operating a vehicle. The data processing system may search the model to identify a nonlinear operation in the first operation. The data processing system may select a second operation from the second operation that approximates the nonlinear operation, the selection being based on a level of computing resources consumed by the second operation, an accuracy of a model generated using the second operation, and an accuracy threshold for operating the vehicle. The data processing system may replace the nonlinear operation with the second operation in the model to generate a second output.
[0004] At least one aspect relates to a method. The method may include receiving, by a data processing system including a memory device coupled to one or more processors, a model including a first operation trained by machine learning, the model generating an output for operating a vehicle. The method may include searching the model by the data processing system to identify a nonlinear operation of the first operation. The method may include selecting, by the data processing system, a second operation from the second operation that approximates the nonlinear operation, the selection being based on a level of computing resources consumed by the second operation, an accuracy of a model generated using the second operation, and an accuracy threshold for operating the vehicle. The method may include replacing the nonlinear operation with the second operation in the model by the data processing system to generate a second output.
[0005] At least one aspect relates to a vehicle. The vehicle may include a data processing system including a memory device coupled to one or more processors. The data processing system may receive a model including a first operation trained by machine learning. The model may be transformed to replace a nonlinear operation of the model with a second operation in a second operation. The second operation may be selected from the second operation to approximate the nonlinear operation. The selection may be based on a level of computing resources consumed by the second operation, an accuracy of a model generated using the second operation, and an accuracy threshold for operating the vehicle. The data processing system may receive sensor data from at least one sensor of the vehicle. The data processing system may execute the model with the sensor data as input to generate an output for operating the vehicle.
[0006] These and other aspects and implementations are discussed in detail below. The foregoing information and the following detailed description include illustrative examples of various aspects and implementations, and provide an overview or framework for understanding the nature and characteristics of the protected aspects and implementations. The accompanying drawings provide illustration and further understanding of various aspects and implementations, and are incorporated into and constitute a part of this specification. The foregoing information and the following detailed description and the accompanying drawings include illustrative examples and should not be considered limiting. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] The drawings are not intended to be drawn to scale. Like reference numbers and names indicate similar elements in the various drawings. For clarity, not every component may be labeled in every drawing. In the drawings:
[0008] Figure 1 An example system for adjusting computing resource consumption of a machine learning model is depicted.
[0009] Figure 2 Depicted is an example machine learning model that includes operations replaced by operations that consume fewer computational resources.
[0010] Figure 3Depicts an example table indicating resource consumption and accuracy of linear operations that approximate nonlinear operations of a machine learning model.
[0011] Figure 4 Depicted is an example table indicating accuracy and resource consumption for multiple operations that approximate particular operations of a machine learning model.
[0012] Figure 5 Depicts example graphs plotting accuracy and resource consumption for multiple operations of a particular operation that approximates a machine learning model.
[0013] Figure 6 An example vehicle including a data processing system that executes a machine learning model is depicted.
[0014] Figure 7 Depicted are example methods for reducing computational resource consumption by a machine learning model.
[0015] Figure 8 Another example method of reducing computational resource consumption of a machine learning model is depicted.
[0016] Fig. 9 is a block diagram illustrating the architecture of a computer system that may be used to implement elements of the systems and methods described and illustrated herein. DETAILED DESCRIPTION
[0017] Various concepts related to methods, devices, and systems for adjusting machine learning model resource consumption and their specific implementations are described in more detail below. The various concepts introduced above and discussed in more detail below can be implemented in any of a variety of ways.
[0018] The present disclosure generally relates to techniques for adjusting (e.g., reducing, maintaining, managing, or otherwise controlling) machine learning model resource consumption of machine learning models used in vehicle systems (e.g., autonomous driving systems, advanced driver assistance systems (ADAS), collision avoidance systems, lane assistance systems). The techniques described herein can optimize machine learning neural network models by classifiably approximating nonlinear operations to reduce latency and power and also increase model performance. The technical solution can facilitate thermal management by reducing the power consumption of processors and other circuits of the vehicle. Machine learning models (such as neural networks) deployed to the data processing system of the vehicle may have one or more criteria to provide high performance and accuracy but operate on a limited amount of processing resources (e.g., processor resources, memory resources, power resources, integrated circuit footprint). The neural network may include linear and nonlinear layers or operations. Linear operations may include matrix multiplication or convolution. Nonlinear operations may include SoftMax, SiLU, or GeLU. To implement nonlinear operations of the neural network, a graphics processing unit (GPU) or a central processing unit (CPU) may use a mathematical software library that consumes a large amount of computing resources. Linear operations may use much fewer processing resources than nonlinear operations.
[0019] To address these and other technical issues, the present solution can identify and replace nonlinear operations of machine learning models with linear operations that approximate nonlinear operations. Linear operations can reduce processing resources used to implement machine learning models. Because there can be multiple linear approximations for a given nonlinear operation, and each approximation can provide different levels of model accuracy and consume different levels of computing resources, the system can perform experiments, simulations, or optimizations to test each operation and select operations that meet one or more criteria. The criterion can be that the replacement operation consumes less than a certain level of processing resources and provides a model output with an accuracy level greater than a threshold. For example, the criterion can be to select an operation that utilizes the least amount of computing resources but provides an accuracy level greater than a threshold. When a model uses a linear approximation operation to generate an output, the accuracy criterion can be based on the accuracy of the output of the entire model, or the accuracy of the output of a sub-model that is part of a larger model.
[0020] The system may create, store, or receive a library of operations that approximate nonlinear operations of a machine learning model. The system may receive a machine learning model and identify a first operation in the machine learning model that consumes processing resources greater than a threshold (e.g., identify a nonlinear operation). The system may analyze a second operation that approximates the first operation and determine which second operation to select as a replacement for the first operation. The system may implement an objective function (e.g., a cost function or a loss function) to select a second operation to approximate a first resource-intensive operation. The objective function may be optimized based on an accuracy metric of a model with each second operation and a processing resource metric for each second operation. Based on the optimization, a second operation may be selected. In response to selecting a second operation to replace the first operation, the system may transform the machine learning model into a less computationally intensive model by replacing the first operation with the second operation. The updated model may then be deployed to a vehicle for execution or implementation.
[0021] Among other things, Figure 1 An example system 100 is shown that adjusts or otherwise manages or controls computing resource consumption of a machine learning model 115. The system 100 may include a data processing system 105. The system 100 may include a vehicle 145. The data processing system 105 may be a system, an apparatus, or an device. The data processing system 105 may be a server or server system, a computing system, a laptop computer, a desktop computer, one or more logic or processing circuits.
[0022] The data processing system 105 may include at least one machine learning model 115. The machine learning model 115 may be a model trained based on at least one machine learning training technique (e.g., gradient descent, Newton's method, conjugate gradient, quasi-Newton's method, Levenberg-Marquardt algorithm). The machine learning model 115 may be a neural network. The neural network may be or include a convolutional neural network, a recurrent neural network, or a fusion network. The machine learning model 115 may implement or may be used to implement autonomous driving, self-driving, ADAS features (e.g., collision avoidance, lane assist, cruise control, etc.).
[0023] The machine learning model 115 may be or include a collection or sequence of sub-models. For example, the machine learning model 115 may be or include a fusion network that fuses data from multiple sensors for autonomous driving. For example, the machine learning model 115 may include a BEV-fusion network, a ResNet, a visual converter, or a YOLOv5 network. The fusion network may connect multiple models together so that the output of one model is used as the input of another model. The fusion network may fuse multiple sensor inputs together to perform vehicle functions. For example, the fusion network may fuse camera data with radar data. The fusion network may create a high-dimensional world view around the vehicle based on data from multiple different types of sensors (e.g., radar, camera, light detection and ranging LIDAR, proximity sensor, accelerometer, speed sensor).
[0024] The machine learning model 115 may include layers, calculations, nodes, or operations. These operations may receive input data and generate output data. Operations may be organized in sequence in the machine learning model 115. For example, the output of one operation may be the input of another operation. These operations may consume different levels of resources (e.g., computing resources, processing resources, power consumption, length of time to complete). These operations may be nonlinear operations or linear operations. These operations may be performed based on retrieving data from a lookup table and multiplying the retrieved data by one or more coefficients. The machine learning model 115 may generate at least one output. The output may be used to control or operate a vehicle. For example, the output may be used in a control system to control the speed of the vehicle, accelerate the vehicle, decelerate the vehicle, change or control the direction of the vehicle, or brake the vehicle.
[0025] The machine learning model 115 can be or include a graph. The graph can be a data structure that is separate from the machine learning model 115 and represents an operation of the machine learning model 115. The graph can include nodes that are connected, interconnected, related, or linked via edges. Each node can be or represent a layer, calculation, or operation of the machine learning model 115. The edges can represent the flow of information through the machine learning model 115. For example, a first node connected to a second node can indicate that the output of the operation represented by the first node is used as an input to the operation represented by the second node.
[0026] The data processing system 105 may include at least one operation identifier 120. The operation identifier 120 may be a piece of software, a script, a function, an executable program, an instruction, or a code. The operation identifier 120 may retrieve or receive a machine learning model 115 from a model source 110. The model source 110 may be a system that trains or stores the machine learning model 115. The model source 110 or the data processing system 105 may train or fully train the machine learning model 115 before the data processing system 105 replaces a high resource consumption operation in the machine learning model 115 with a lower resource consumption operation. The model source 110 may include one or more data sets for training, validating, or testing the machine learning model 115. The model source 110 may train the machine learning model 115 using a training data set, validate the machine learning model 115 using a validation data set, and test the machine learning model 115 using a test data set. In addition, the model source 110 may provide one of the data sets, such as the validation data set, to the replacement selector 125. The replacement selector 125 may use the validation data set to test various replacement operations 130 in the machine learning model 115.
[0027] The operation identifier 120 can perform a search of the machine learning model 115. For example, the operation identifier 120 can search the machine learning model 115 to identify an operation that meets a criterion. The criterion can be that the operation consumes processing resources greater than a threshold. For example, the operation identifier 120 can compare the lookup table size of each operation to a threshold and identify operations that include a lookup table greater than the threshold. The criterion can be the length of time it takes for the operation to execute, the CPU or GPU utilization of the operation, etc. The criterion can be that the operation is a non-linear operation. Based on the search, the operation identifier 120 can identify at least one operation in the machine learning model 115 that is a resource-intensive operation.
[0028] The data processing system 105 may include a replacement selector 125. The replacement selector 125 may be a piece of software, a script, a function, an executable program, an instruction, or a code. The replacement selector 125 may select an operation to replace an identified operation in the machine learning model 115. For example, the replacement selector 125 may replace a first operation of the machine learning model 115 with a second operation. The second operation may consume, utilize, or require fewer processing resources than the first operation. For example, the replacement selector 125 may replace a nonlinear operation in the machine learning model 115 with a linear operation.
[0029] There may be multiple different replacement operations 130 that can replace the identified operation in the machine learning model 115. The replacement selector 125 can search the library of available replacement operations 130 and identify a set of replacement operations 130 that can approximate or map to the identified operation. The library of replacement operations 130 may include various low resource consumption operations that can be approximated or mapped to high resource consumption operations. For example, the library of replacement operations 130 may include linear operations that can approximate different types of non-linear operations. The library can map each type of non-linear operation to a set or group of linear operations that can approximate the non-linear operation. For example, the replacement selector 125 can receive an indication of the type of non-linear operation identified in the machine learning model 115. In response to receiving the indication of the non-linear operation, the replacement selector 125 can identify a set or group of replacement operations 130, and then search or optimize the set of replacement operations 130 to identify one replacement operation 130 for use in the machine learning model 115.
[0030] The computing system 105 may receive, generate, store, or develop a library, group, set, repository, or database of replacement operations 130. The library of replacement operations may be a previously developed approximation scheme. For example, before the data processing system 105 analyzes the machine learning model 115 to transform the machine learning model 115 into an updated machine learning model 135, the library of the data processing system 105 may store the library of replacement operations 130. The library may be generated by the data processing system 105 based on the resources and computing performance level of the computing system 150 of the vehicle 145. The data processing system 105 may generate the library based on the mathematical accuracy and precision used to execute the machine learning model 115 on the vehicle 145.
[0031] Each replacement operation 130 may consume a different level of processing resources. In addition, each of the replacement operations 130 may cause the machine learning model 115 to operate with a different degree of accuracy. In this regard, the replacement selector 125 may identify a set of replacement operations 130 that may approximate or map to the identified operation, and run an experiment, test, or simulation test that tests each replacement operation of the set of replacement operations 130 in the machine learning model 115. For example, the replacement selector 125 may select a second operation from a plurality of second operations that approximates a first operation. The selection may be based on the level of computing resources consumed by the second operation, the accuracy of the machine learning model 115 generated using the second operation, and an accuracy threshold for operating the vehicle 145. The selected replacement operation may be mapped to the identified operation and use fewer computing resources relative to the identified operation.
[0032] The threshold value may be based on the service, work, or purpose that the machine learning model 115 performs for the vehicle 145. For example, the model 115 may recognize or detect different types of objects in the driving environment of the vehicle 145. The model 115 may have a high level of accuracy for performing object classification. A segmentation model 115 that classifies roads relative to other surfaces or structures (surfaces or structures that are not roads) may have an even higher threshold than an object classification model 115. A security model 115 that distinguishes between entities around the vehicle 145 (e.g., a dog versus a person) when the vehicle 145 is locked may have a lower accuracy threshold, making it easier to raise an alarm.
[0033] The replacement selector 125 may receive, store, or generate a threshold or tolerance level for the accuracy of the machine learning model 115 to be deployed to the vehicle 145. The replacement selector 125 may generate a threshold for identifying replacement operations 130 based on the type of vehicle 145, the workload of the machine learning model 115, and the application using the machine learning model 115. For example, a self-driving or ADAS feature may have a first threshold, while a route suggestion application or a comfort feature may have a second threshold that is lower than the first threshold.
[0034] For example, the replacement selector 125 may iteratively test each replacement operation 130 in the machine learning model 115 and generate an accuracy level or score for each replacement operation 130. For example, the replacement selector 125 may include or receive a data set to test the machine learning model 115. The data set may be a validation data set that is blocked from training the machine learning model 115. The machine learning model 115 may be fully trained before the operation identifier 120 identifies the operation to be replaced and before the replacement selector 125 selects the replacement operation 130. The replacement selector 125 may iteratively replace the identified operation with each replacement operation 130, execute the machine learning model 115 with the validation data set, and generate an accuracy for each replacement operation 130. The accuracy may be a percentage (e.g., the number of correct predictions made relative to the total number of predictions attempted). In addition to or in lieu of the accuracy, the replacement selector 125 may generate an accuracy value, a rescale value, an F-score, a confusion matrix, or a receiver operating curve (ROC) for each replacement operation 130.
[0035] The replacement selector 125 may generate a level of accuracy for each replacement operation 130 by measuring, determining, or identifying a value generated at a point within the machine learning model 115. For example, the replacement selector 125 may select a point or output of a particular operation within the machine learning model 115. The replacement selector 125 may replace the identified operation with the replacement operation 130 and determine the value generated by the machine learning model 115 at the point within the model. The replacement selector 125 may compare the determined value to the value generated by the originally identified operation. The replacement selector 125 may determine the value at the point for each operation and use the value to generate an accuracy for each operation.
[0036] The replacement selector 125 may select the point as the output of an operation within the machine learning model 115. For example, the replacement selector 125 may select the output of an operation within the machine learning model 115 that receives the input of the identified operation. The selected operation for measuring accuracy may be performed immediately after the identified operation, or immediately after a specific number of operations after the operation identified for replacement. The replacement selector 125 may utilize a graph representing the machine learning model 115 to identify a point for measuring accuracy within the machine learning model 115. The replacement selector 125 may identify a first node representing the identified operation and identify a second node representing another operation that operates based on the output of the identified operation and is separated from the first node by a number of nodes or edges less than a threshold. The replacement selector 125 may select the second node in response to identifying that the second node is separated by a number of nodes or edges less than a threshold and determining that the operation represented by the second node receives the output of the identified operation or an input based on the output of the identified operation. When replacement operations 130 are inserted into the machine learning model 115 and the machine learning model 115 is executed, the replacement selector 125 can use the output of the operation represented by the second node to determine the accuracy of each replacement operation 130.
[0037] The replacement selector 125 may determine or identify a level of computing resources used to perform each replacement operation 130 in the machine learning model 115. For example, the replacement selector 125 may determine the lookup table size, the number of multiplication coefficients used to perform the number of multiplication operations for the replacement operation 130, the length of time the replacement operation 130 takes to execute, the number of processing cycles to complete the operation, the amount of memory required to store or execute the operation. The replacement selector 125 may generate a discrete metric or score, or a composite score that combines multiple resource consumption metrics.
[0038] The replacement selector 125 may select an alternative operation 130 from the set of alternative operations 130 based on the accuracy of each alternative operation 130 within the machine learning model 115 and the level of computing resources consumed by each alternative operation 130. For example, the replacement selector 125 may select the alternative operation 130 that consumes the least amount of computing resources but has an accuracy greater than a threshold. The threshold may be set based on the level of accuracy used to operate the vehicle 145.
[0039] The replacement selector 125 may optimize an objective function, a cost function, or a loss function to select a replacement operation 130. For example, after testing each replacement operation 130 in the machine learning model 115, the replacement selector 125 may use the accuracy and resource consumption of each replacement operation 130 to optimize the objective function. The optimization may be based on a constraint for searching the space of replacement operations 130 so as to use one replacement operation 130 in the machine learning model 115. The constraint may be an inequality constraint or an equality constraint. For example, the constraint may be an inequality constraint that identifies a replacement operation 130 with an accuracy greater than a threshold. These constraints may include inequality constraints that identify replacement operations 130 with resource consumption less than a threshold. The replacement operation 130 may optimize the objective function to minimize resource consumption, maximize accuracy, or balance resource consumption and accuracy. For example, the replacement operation 130 may optimize the objective function with accuracy and resource consumption as decision variables. The optimization of the objective function may be performed using at least one optimization algorithm, such as a primitive simplex algorithm, a cross intersection algorithm, an interior point algorithm.
[0040] The replacement selector 125 may replace the identified operation in the machine learning model 115 with the selected replacement operation 130. The replacement selector 125 may generate an updated machine learning model 135. The replacement selector 125 may delete the identified operation and insert, save, or add the selected replacement operation 130 to the machine learning model 115 to generate an updated machine learning model 135. The updated machine learning model 135 may be otherwise identical to the machine learning model 115 except for the replacement operation 130 inserted into the machine learning model 115. The updated machine learning model 135 may generate an output that is different from the output that the machine learning model 115 would generate. For example, the updated machine learning model 135 may output a value that is different from the value that the machine learning model 115 would output given a particular input.
[0041] The machine learning model 115 may include multiple models or sub-models. The operation identifier 120 may identify the operation in each model of the machine learning model 115, and the replacement selector 125 may select a replacement operation 130 for each identified operation. The identification and replacement may be performed iteratively. For example, the operation identifier 120 may identify a first operation in a first model, and then the replacement selector 125 may select a replacement operation 130 for the first operation. Then, the operation identifier may identify a second operation in a second model, and then the replacement selector 125 may select a replacement operation 130 for the second operation. The operation identifier 120 and the replacement selector 125 may iteratively analyze each sub-model within the machine learning model to identify and replace the operations of the sub-model.
[0042] The data processing system 105 may include a deployer 140. The deployer 140 may be a piece of software, a script, a function, an executable program, an instruction, or a code. The deployer 140 may receive the updated machine learning model 135 from the replacement selector 125. The deployer 140 may deploy the updated machine learning model 135 to the vehicle 145. The vehicle 145 may include a computing system 150. The deployer 140 may deploy the updated machine learning model 135 to the computing system 150 of the vehicle 145. For example, the deployer 140 may transmit, send, deliver, or communicate the updated machine learning model 135 over one or more networks, connections, or programming interfaces to store the updated machine learning model 135 on the computing system 150. The computing system 150 may include one or more components or functions of the data processing system 105.
[0043] The computing system 150 of the vehicle 145 can store the updated machine learning model 135. The computing system 150 of the vehicle 145 can include a model executor 160. The model executor 160 can be a piece of software, a script, a function, an executable program, instructions, or code. The model executor 160 can be a neural network or a machine learning engine that executes the machine learning model. The model executor 160 can be a GPU, a CPU, or a hardware device that executes the machine learning model 115.
[0044] The model actuator 160 can execute the updated machine learning model 135 to operate the drive system 155 of the vehicle 145. The model actuator 160 can collect data from the vehicle's sensors or input devices 165 (e.g., radar system, LIDAR system, camera, distance sensor, color sensor, vibration sensor, steering wheel, accelerator, brake), or other sensors or data sources of the vehicle 145. The model actuator 160 can use the sensor data received from the sensor 165 as input to execute the updated machine learning model 135 and generate an output. The output can be a decision to operate the vehicle 145. The output can be information used by another system, application, or model to operate the vehicle 145. For example, the output of the updated machine learning model 135 can be a point map that fuses data from multiple data sources, and another system, application, or model uses the multiple data sources to drive the vehicle 145. For example, the output can indicate that the vehicle 145 is deviating from the lane. The output can indicate that the vehicle 145 is approaching an object and is about to brake. The output can indicate that the vehicle 145 will turn along a curve in the road. The output may indicate adjusting the speed of the vehicle (eg, increasing or decreasing the speed) to maintain a following distance from another vehicle.
[0045] Based on the output of the updated machine learning model 135, the computing system 150 can transmit, send, deliver or communicate commands to the drive system 155 of the vehicle 145. The drive system 155 may include a motor, a high voltage distribution box (HVDB), a gear or a brake. The drive system 155 can operate the motor to drive the vehicle 145 forward, backward, accelerate, decelerate, turn or brake. The drive system 155 can operate the vehicle 145 to transport, translate or move. For example, based on the output of the updated machine learning model 135, the drive system 155 can cause power to be delivered to the vehicle motor at different voltage levels, duty cycles or frequencies of alternating current (AC) voltages. The output can indicate that the vehicle is deviating from the lane to the left or right, and the drive system 155 can operate the drive system 155 to center the vehicle 145 in the lane. The output can indicate that the vehicle 145 is approaching an object, and the drive system 155 can operate to brake the vehicle 145 to avoid contact with the object. The output can indicate the distance between the vehicle 145 and another vehicle in front of the vehicle 145. Drive system 155 may operate based on the output to maintain a following distance between vehicle 145 and another vehicle by increasing or decreasing the speed of vehicle 145 .
[0046] The model executor 160 can store multiple versions of the updated machine learning model 135. For example, the replacement selector 125 can generate multiple versions of the updated machine learning model 135 with various levels of accuracy or computational resource consumption using the machine learning model 115. For example, the replacement selector 125 can generate a first updated machine learning model 135 with a first accuracy threshold. The first updated machine learning model 135 can consume a first level of computational resources.
[0047] The replacement selector 125 may generate a second updated machine learning model 135 having a second accuracy threshold. The first updated machine learning model 135 may consume a second level of computing resources. The second accuracy threshold may be greater than the first threshold. In addition, the second level of computing resources may be greater than the first level of computing resources. The two updated machine learning models 135 may be deployed to the model executor 160. The model executor 160 may receive inputs and trigger the selection and execution of the first updated machine learning model 135 or the second updated machine learning model 135. For example, the input may be the driving mode of the vehicle 145, the type of road on which the vehicle 145 is driving (e.g., a highway, a city street, a rural road, a private driveway), or the speed at which the vehicle 145 is driving. For example, when the vehicle 145 is on a highway or traveling at a first speed, the model executor 160 may retrieve and execute an updated machine learning model 135 to operate the vehicle 145, which is calibrated to be accurate for depth measurements up to 50 meters. When vehicle 145 is traveling on a private driveway or at a second speed that is less than the first speed, model executor 160 can retrieve and execute the updated machine learning model 135 to operate vehicle 145, where the updated machine learning model is calibrated to be accurate for depth measurements up to five meters.
[0048] Among other things, Figure 2 An example machine learning model 115 is shown that includes an operation 210 replaced by an operation 130 that consumes less computing resources. The machine learning model 115 can be represented as Figure 2, where each operation 210 is represented by a node, and edges link the nodes to represent the flow of information through the machine learning model 115. The machine learning model 115 includes sub-models 230 represented as sub-graphs G1, G2, and G3 within a larger graph representing the machine learning model 115. The machine learning model 115 and the updated machine learning model 135 can each be trained to perform based on at least one input 205. The input 205 can be data collected, measured, or generated by the sensor 165. The input 205 can be an image of the environment surrounding the vehicle 145 taken by a camera. The input 205 can be a depth value of the depth sensor 165 measured by the vehicle 145 between the vehicle and an object such as another vehicle, a tree, a rock, or a wall. The input 205 can be radar data captured by a radar system of the vehicle 145. The input 205 can be LIDAR data captured by a LIDAR system of the vehicle 145.
[0049] Operation identifier 120 may identify an operation (e.g., a nonlinear operation) in machine learning model 115 or between sub-models of machine learning model 115 that consumes an amount of processing resources greater than a threshold. Figure 2 , the operation identifier 120 may identify an operation B, an operation D, and an operation G (e.g., a nonlinear operation) that consumes an amount of processing resources greater than a threshold. For each identified operation, the replacement selector 125 may search for replacement operations 130 to identify an operation 130 that may approximate or map to the identified operation. For example, the replacement selector 125 may identify a set of operations 130 for each identified operation 210. For example, the replacement selector 125 may identify three replacement operations B0, B1, and B2 that may approximate operation B. The replacement selector 125 may identify four replacement operations D0, D1, D2, and D3 that may approximate operation D. The replacement selector 125 may identify two replacement operations G0 and G1 that may approximate operation G.
[0050] The replacement selector 125 may identify at least one evaluation point 225 within the model 115 to measure the accuracy of each replacement operation 130. The replacement selector 125 may identify a first evaluation point 225 for evaluating the performance of a first operation, the replacement selector 125 may identify a second evaluation point 225 for evaluating the performance of a second operation, and the replacement selector 125 may identify a third point 225 for evaluating the performance of a third operation. For example, to measure the accuracy of the replacement operation 130 of operation B, the replacement selector 125 may select the evaluation point 225 as the output of the model 230 in which operation B is included. For example, the replacement selector 125 may select the output of operation C as the evaluation point 225 for evaluating the execution of operation B. Similarly, the replacement selector 125 may select the output of operation E as the evaluation point 225 for evaluating the execution of the replacement operation 130 of operation D. In addition, the replacement selector 125 may select operation 220 as the evaluation point 225 for measuring the execution of each replacement operation 130 of operation G.
[0051] The replacement selector 125 may use a data set (e.g., a validation data set used to validate the training of the model 115) to identify the accuracy of the replacement operation 130. The replacement selector 125 may measure one or more values at an evaluation point 225, which may be the output of operation C when operation B is used in the model 115 and the model 115 is executed on the data set. When the value of operation B is measured, none of the other operations of the model 115 may be replaced by the replacement operation 130. The replacement selector 125 may iteratively replace operation B with each of the operations B0, B1, and B2. When each replacement operation 130 is used in the model 115, the replacement selector 125 may execute the model 115 with the data set of each replacement operation 130, and measure the value at the evaluation point 225 (e.g., the output of operation C) when each replacement operation 130 is used in the model 115. The replacement selector 125 may use the values measured for the original operation B and each replacement operation B0, B1, and B2 to generate the accuracy or performance level of each operation B0, B1, and B2. For example, to generate the accuracy of operation B0, replacement selector 125 may compare the value at the output of operation C generated by model 115 when model 115 is executed on a data set when operation B is used in model 115 with the value generated by model 115 at the output of operation C when model 115 is executed on a data set when operation B0 is used in model 115.
[0052] The replacement selector 125 may identify the level of computing resources consumed by each replacement operation B0, B1, and B2. The replacement selector 125 may select one of the replacement operations B0, B1, and B2 to replace operation B based on the accuracy level of each of the replacement operations B0, B1, and B2 and the level of computing resources consumed by each replacement operation B0, B1, and B2. The replacement selector 125 may select one replacement operation 130 that has an accuracy level greater than a threshold and consumes the least amount of computing resources compared to the other replacement operations 130. For example, in Figure 2 In the example, the replacement selector 125 may select operation B2 to replace operation B.
[0053] The replacement selector 125 may repeat the process of executing the model 115 with each of the original operation 210 and the replacement operation 130 and measuring the value at the evaluation point 225. For example, once operation B2 is identified as a replacement for operation B, the replacement selector 125 may identify one of operations D0, D1, D2, and D3 to replace operation D. The replacement selector 125 may execute the model 115 with operation D based on the data set and measure the value at the evaluation point 225 (e.g., the output of operation E). The replacement selector 125 may iteratively replace operation D with operations D0, D1, D2, and D3, execute the model 115 based on the data set, and measure the value at the output of operation E. The replacement selector 125 may compare the value generated at the evaluation point 225 when the model 115 is executed with operation D with the value generated at the evaluation point 225 when the model 115 is executed with operations D0, D1, D2, and D3, respectively. When the model 115 is executed to identify a replacement for operation D, the model may be executed with the replacement operation (i.e., operation B2) selected to replace operation B. The replacement selector 125 may repeat the process of executing the model 115 with each of the original operation 210 and the replacement operation 130 and measuring the value at the evaluation point 225. The updated machine learning model 135 may generate an output 235. For a given input, the output 235 generated by the updated machine learning model 135 may be different from the output 220 generated by the machine learning model 115.
[0054] Among other things, Figure 3 An example table 300 is depicted indicating resource consumption and accuracy of linear operations 130 that approximate nonlinear operations 210 of machine learning model 115. Table 300 may be a data structure generated by data processing system 105 to update machine learning model 115. For example, operation identifier 120 and replacement selector 125 may construct table 300 and use table 300 to update machine learning model 135. Data processing system 105 may generate a graphical representation of table 300 and present the graphical representation to a user in a user interface on a user device.
[0055] Table 300 may include a first column identifying three different nonlinear operations 210 (a first operation, a second operation, and a third operation). Although table 300 shows three nonlinear operations 210 identified for replacement in model 115, any number of operations 210 for replacement may be included in table 300. A second column of table 300 may identify the types of the three nonlinear operations 210, GeLU, Softmax, and SiLU. Table 300 may include an index of different approximation methods. For a GeLU operation 210, there may be three identified approximation operations 130 that may approximate the GeLU operation 210. For a Softmax operation 210, there may be three identified approximation operations 130 that may approximate the Softmax operation 210.
[0056] Table 300 may include a column indicating resources consumed by the replacement operation 130. Each row in the column may indicate the size of the lookup table (LUT) and the number of multiplication coefficients (coeffs). Table 300 may include an accuracy column. The accuracy column may indicate the accuracy level of the model 115 executed using each replacement operation 130 compared to the model 115 executed using the operation 210 identified for replacement. Table 300 may include a range column 470. The range column may indicate the data type output by each of the replacement operations 130. For example, the first replacement operation 130 may be a 32-bit floating point (FP32) output or a 16-bit floating point (FP16) output. The second replacement operation 130 may have a brain 16-bit floating point (BFloat16) output. The third replacement operation 130 may have a customizable output. The output of the third replacement operation 130 may be a signed 8-bit integer (INT8) or a signed 16-bit integer (INT16).
[0057] Table 300 may indicate a replacement operation 130 for the Softmax operation 210. A replacement operation 130 may include a 32-bit floating point (FP32) output or a 16-bit floating point (FP16) output. Another replacement operation 130 may include a 16-bit brain floating point (BFloat16) output. A third replacement operation 130 may have a customizable output. The output of the third replacement operation 130 may be a signed 8-bit integer (INT8) and a signed 16-bit integer (INT16).
[0058] Among other things, Figure 4 An example table 400 is depicted indicating the accuracy and resource consumption of multiple replacement operations 130. Table 400 may be a data structure generated by data processing system 105 to update machine learning model 115. For example, operation identifier 120 and replacement selector 125 may construct table 400 and use table 400 to update machine learning model 135. Data processing system 105 may generate a graphical representation of table 400 and present the graphical representation to a user in a user interface on a user device.
[0059] Table 400 may include columns for replacement operations 130 for the identified operations of the sub-model (e.g., for node D of the sub-model represented by sub-graph G2). For example, the replacement operations 130 may be D0, D1, D2, and D3. Table 400 may include columns for accuracy and resource consumption. The accuracy of each replacement operation 130 may be relative to the accuracy or true value of the operation represented by node D in the machine learning model 115.
[0060] The replacement selector 125 may execute the machine learning model 115 with operation D and measure the value at the evaluation point 225 at the output of operation E in the machine learning model 115. The replacement selector 125 may use the measured value to determine the accuracy level of operation D. The accuracy of the level of operation D may be 84% accuracy. Because the resource consumption is measured relative to operation D, the resource consumption level of node D may be 100%.
[0061] The replacement selector 125 may identify a set of replacement operations 130 from a library, database, or data repository. The replacement selector 125 may identify operations D0, D1, D2, and D3 that may replace the identified operation D. The replacement selector 125 may execute the machine learning model 115 using each of the operations D0, D1, D2, and D3. The replacement selector 125 may measure the value of the evaluation point 225 (at the output of operation E) each time the machine learning model 115 executes each of the operations D0, D1, D2, and D3. The replacement selector 125 may determine the accuracy level of each operation based on the measured values. For example, when the model 115 is executed using operation D0, the value generated at the output of operation E may be used to generate the accuracy level of operation D0. When the model 115 is executed using operation D1, the value generated at the output of operation E may be used to generate the accuracy level of operation D1. When the model 115 is executed using operation D2, the value generated at the output of operation E may be used to generate the accuracy level of operation D2. The value generated at the output of operation E when executing model 115 using operation D3 may be used to generate a level of accuracy for operation D3.
[0062] The accuracy level of operation D0 may be 65%. The accuracy level of operation D1 may be 80%. The accuracy level of operation D2 may be 71%. The accuracy level of operation D3 may be 81%. Table 300 may include a column for annotations for each operation. Because replacement selector 125 may determine the accuracy and resources of each replacement operation 130, replacement selector 125 may balance the accuracy degradation and resource tradeoffs to enable replacement selector 125 to increase the performance of machine learning model 115 when deployed to vehicle 145.
[0063] Among other things, Figure 5 Depicted is an example graph 500 that plots the accuracy and resource consumption of multiple operations 130 that approximate a particular operation 210 of a machine learning model 115. Graph 500 may be a data structure generated by data processing system 105 to update machine learning model 115. For example, operation identifier 120 and replacement selector 125 may construct graph 500 and use graph 500 to update machine learning model 135. Data processing system 105 may generate a graphical representation of graph 500 and present the graphical representation to a user in a user interface on a user device.
[0064] Graph 500 includes trend 505 and trend 510. Trend 505 may be a trend of the accuracy of the replacement operations D0, D1, D2, and D3. Trend 510 may be a trend of the resource consumption of the replacement operations D0, D1, D2, and D3. The values plotted in graph 500 may be the accuracy and resource consumption levels of table 400.
[0065] Element 515 in diagram 500 may identify the most mathematically precise operation D. Diagram 500 may include element 520 in diagram 500 identifying operation D1 selected to replace operation D in machine learning model 115. Replacement selector 125 may identify operation D1 as providing a level of accuracy greater than a threshold but a level of resource consumption less than a threshold. Alternative selector 125 may identify operation D1 as providing a level of accuracy greater than a threshold but having a minimum level of resource consumption of all replacement operations 130 having a level of accuracy above the threshold.
[0066] Figure 6An exemplary cross-sectional view 600 of an electric vehicle 145 with at least one battery pack 635 installed is depicted. The electric vehicle 145 may include an electric truck, an electric sport utility vehicle (SUV), an electric van, an electric car, an electric car, an electric motorcycle, an electric scooter, an electric passenger car, an electric passenger or commercial truck, a hybrid vehicle or other vehicle, such as a marine or air vehicle, an airplane, a helicopter, a submarine, a ship, or a drone, among other possibilities. The battery pack 635 may also be used as an energy storage system to power a building such as a residential or commercial building. The electric vehicle 145 may be fully electric or partially electric (e.g., a plug-in hybrid), and further, the electric vehicle 145 may be fully autonomous, partially autonomous, or unmanned. The electric vehicle 145 may also be manually operated or non-autonomous. The electric vehicle 145 (such as an electric truck or car) may include an onboard battery pack 635, a battery 645, or a battery module 640, or a battery cell 645 to power the electric vehicle. The electric vehicle 145 may include a chassis 620 (e.g., a frame, an internal frame, or a support structure). The chassis 620 may support various components of the electric vehicle 145. The chassis 620 may span a front portion 605 (e.g., a hood or lid portion), a body portion 610, and a rear portion 615 (e.g., a luggage compartment, payload, or trunk portion) of the electric vehicle 145. A battery pack 635 may be mounted or placed within the electric vehicle 145. For example, the battery pack 635 may be mounted within one or more of the front portion 605, the body portion 610, or the rear portion 615 on the chassis 620 of the electric vehicle 145. The battery pack 635 may include or be connected to at least one bus bar, such as a current collector element. For example, the first bus bar 630 and the second bus bar 625 may include conductive materials to connect or otherwise electrically couple the battery 640 , battery module 640 , or battery cell 645 to other electrical components of the electric vehicle 145 to provide power to various systems or components of the electric vehicle 145 .
[0067] exist Figure 6In the embodiment, the vehicle 145 may include a computing system 150. The computing system 150 may execute the updated machine learning model 135 based on the sensor measurements of the sensors 165 of the vehicle 145. For example, the computing system 150 may receive data from the sensors or input devices 165 of the vehicle (e.g., a radar system, a light detection and ranging (LIDAR) system, a camera, a distance sensor, a color sensor, a vibration sensor), or receive data from other sensors or data sources of the vehicle 145. The computing system 150 may execute the updated machine learning model 135 with the sensor data as input and generate an output. The computing system 150 may use the output to operate the vehicle 145. For example, the computing system 150 may power on or off the vehicle 145. The computing system 150 may cause the vehicle 145 to move forward or backward. The computing system 150 may control the speed of the vehicle 145, the acceleration of the vehicle 145, and the turning of the vehicle 145. The computing system 150 of the vehicle 145 may use the output 235 of the updated machine learning model 135 to control the drive system 155 of the vehicle.
[0068] Among other things, Figure 7 An example method 700 of reducing computing resource consumption of a machine learning model 115 is depicted. The method 700 may include a step 705 of receiving a model. The method 700 may include a step 710 of searching for a model for a first operation. The method 700 may include a step 715 of selecting a second operation. The method 700 may include a step 720 of replacing the first operation. At least a portion of the method 700 may be performed by a data processing system 105. At least a portion of the method 700 may be performed by an operation identifier 120, a replacement selector 125, or a deployer 140 of the data processing system 105. At least a portion of the method 700 may be performed by a computing system 150. At least a portion of the method 700 may be performed by a model executor 160. At least a portion of the method 700 may be performed by a sensor 165. At least a portion of the method 700 may be performed by a computing system 155.
[0069] In step 705, method 700 may include data processing system 105 receiving a model. Data processing system 105 may receive machine learning model 115 from model source 110. Data processing system 105 may retrieve or request machine learning model 115 from model source 110. Data processing system 105 may receive a fully or partially trained model 115. For example, model source 110 may be a data repository of machine learning models 115 that have been fully designed or fully trained. Operation identifier 120 may receive machine learning model 115 from a component or data source (e.g., model source 110) within data processing system 105. Operation identifier 120 may receive machine learning model 115 from a component external to data processing system 105.
[0070] In step 710, the method 700 may include searching, by the data processing system 105, a model for a first operation. For example, the operation identifier 120 may search the machine learning model 115 to identify a first operation 210 to be replaced with an approximation. For example, the operation identifier 120 may search the operations 210 of the machine learning model 115 to identify an operation 210 that is a non-linear operation. For example, the operation identifier 120 may search a name, library, tag, indication, or other data indicating that a particular operation 210 is a non-linear operation. The machine learning model 115 may generate a value indicating resource consumption of each operation 210 in the machine learning model 115. For example, the operation identifier 120 may identify at least one first operation 210 that consumes a resource level greater than a threshold. The identified first operation 210 may be identified as an operation to be replaced with a replacement operation 130.
[0071] In step 715, the method 700 may include selecting, by the data processing system 105, a second operation. The replacement selector 125 may select the second operation 130 to replace the first operation 210. The replacement selector 125 may select a replacement operation 130 to approximate and replace the operation identified in step 710. For example, the replacement selector 125 may search the replacement operations 130 to identify at least one replacement operation 130 that may approximate the first operation identified in step 710. For example, the replacement selector 125 may search a library of replacement operations 130 with an identifier of the identified operation to identify a set or group of replacement operations 130 that may approximate or map to the identified operation 210.
[0072] The replacement selector 125 may identify an evaluation point 225 within the machine learning model 115 to evaluate the performance of each replacement operation 130 identified that may approximate the first operation 210. The replacement selector 125 may select a point within the machine learning model 115 to measure a value. The replacement selector 125 may iteratively replace the first operation 210 with each identified replacement operation 130 and execute the machine learning model 115 with the replacement operation 130. The replacement selector 125 may measure the value at the evaluation point 225 for each replacement operation 130. The replacement selector 125 may generate an accuracy level for each replacement operation 130.
[0073] The replacement selector 125 may identify the evaluation point 225 by identifying the output of an operation that uses the output of the first operation 210 as an input to the operation. The replacement selector 125 may identify the next or subsequent operation in the machine learning model 115 that is performed based on the output of the first operation 210. For example, the replacement selector 125 may search the graphical representation of the machine learning model 115 and identify the node representing the operation that uses the output of the first operation 210 as an input by identifying the node that is separated from the node representing the identified operation 210 by less than a threshold number of nodes or edges (e.g., identifying a minimum number of nodes or edges).
[0074] In step 720, method 700 may include replacing the first operation by data processing system 105. Data processing system 105 may delete the first operation and save the second operation in place of the first operation. Data processing system 105 may connect the input into first operation 210 to second operation 130. Data processing system 105 may identify that the output of first operation 210 is used as an input of a third operation. Data processing system 105 may connect the output of second operation 130 to the input of the third operation in response to the identification.
[0075] Among other things, Figure 8 Another example method 800 of reducing computational resource consumption of a machine learning model 115 is depicted. The method 800 may include a step 805 of receiving a fully trained machine learning model, a graph representing the model, and an evaluation data set. The method 800 may include a step 810 of identifying nodes in the graph representing nonlinear operations that can be approximated. The method 800 may include a step 815 of analyzing input operation conditions of the nonlinear operation. The method 800 may include a step 820 of retrieving an operation that approximates the nonlinear operation based on the operation conditions. The method 800 may include a step 825 of identifying the nearest subsequent node to measure accuracy. The method 800 may include a step 830 of iteratively applying the input to the model to evaluate each operation of the approximate nonlinear operation. The method 800 may include a step 835 of selecting a second operation based on a level of computational resources and an accuracy threshold. The method 800 may include a step 840 of transforming the model using the second operation.
[0076] At least a portion of method 800 may be performed by data processing system 105. At least a portion of method 800 may be performed by operation identifier 120, replacement selector 125, or deployer 140 of data processing system 105. At least a portion of method 800 may be performed by computing system 150. At least a portion of method 800 may be performed by model executor 160. At least a portion of method 800 may be performed by sensor 165. At least a portion of method 800 may be performed by computing system 155.
[0077] In step 805, method 800 may include receiving, by data processing system 105, a fully trained machine learning model, a graph representing the model, and an evaluation data set. Operation identifier 120 may receive a fully or partially trained model. For example, before operation identifier 120 receives machine learning model 115, operation identifier 120 may be trained using a training data set. Operation identifier 120 may receive a graph representing machine learning model 115. The graph may be a data structure that is part of or separate from machine learning model 115. The graph may include nodes representing operations or layers of machine learning model 115. The graph may include edges between nodes representing connections between inputs and outputs of the operations represented by the nodes. For example, an edge between a first node representing a first operation and a second node representing a second operation indicates that the output of the first operation is used as an input to the second operation.
[0078] In step 810, method 800 may include identifying, by data processing system 105, nodes in the graph that represent nonlinear operations that may be approximated. For example, operation identifier 120 may search the graph to identify nodes in the graph that represent operations that are nonlinear operations. Operation identifier 120 may search the graph and select nodes that are marked, labeled, or identified as representing nonlinear operations.
[0079] In step 815, the method 800 may include analyzing, by the data processing system 105, input operation conditions of the nonlinear operation. The operation condition may be a type of the nonlinear operation, such as GeLU, Softmax, or SiLU. In step 820, the method 800 may include retrieving, by the data processing system 105, an operation that approximates the nonlinear operation based on the operation condition. For example, the replacement selector 125 may identify a set or group of replacement operations 130 that may approximate the operation represented by the nonlinear node. The search may be based on the name or type of the nonlinear operation. For example, the replacement selector 125 may identify that a first set of linear operations may approximate a GeLU operation. The replacement selector 125 may identify that a second set of linear operations may approximate a Softmax operation. The replacement selector 125 may identify that a first set of linear operations may approximate a SiLU operation.
[0080] In step 825, the method 800 may include identifying, by the data processing system 105, the closest subsequent node to measure accuracy. For example, for each nonlinear node identified by the operation identifier 120, the replacement selector 125 may select the evaluation point 225. The evaluation point 225 may be the output of the closest subsequent node to the node representing the identified operation. For example, the replacement selector 125 may search the graph to identify the node that appears after the identified node in the graph. For example, the replacement selector 125 may be executed directly or indirectly based on the output of the identified node. The replacement selector 125 may identify the node to measure accuracy by determining the number of nodes or edges between the node identified for replacement and at least one other node to measure accuracy. The replacement selector 125 may identify the node to measure accuracy by identifying the node separated from the node identified for replacement (which is separated by the least number of nodes or the least number of edges). The replacement selector 125 may search only for nodes in the machine learning model 115 that have not been replaced, such as nodes representing operations that consume less than a threshold amount of processing resources or nodes representing that an operation is linear.
[0081] The replacement selector 125 may select the final output 220 of the machine learning model 115 as an evaluation point 225 to evaluate the performance of one or more replacement operations 130 that replace the non-linear operation 210. Measuring the output 220 to update the machine learning model 115 may produce a highly accurate updated machine learning model 135. However, using the output 220 as the evaluation point 225 may result in a longer duration for updating the machine learning model 115 or a large amount of computing resources for updating the machine learning model 115. By selecting an evaluation point 225 close to each identified non-linear operation within the machine learning model 115, each non-linear operation may be individually tested and replaced in a piecewise manner in a shorter period of time, with a lower amount of power consumption, or with a lower amount of processing resources.
[0082] In step 830, the method 800 may include iteratively applying, by the data processing system 105, the input to the model to evaluate each operation of the approximate nonlinear operation. For example, the replacement selector 125 may receive a data set. The data set may be the evaluation data set received in step 805. The data set may be a training data set, a validation data set, or a test data set. The replacement selector 125 may iteratively replace the identified nonlinear operation with each of the identified linear operations, execute the machine learning model 115 with each of the nonlinear operations, and measure the value at the evaluation point 225 within the machine learning model 115. The machine learning model 115 may be executed using the evaluation data set as the input 205 to the machine learning model 115. The evaluation point 225 may be the output of each sub-model within the machine learning model 115 or the output 220 of the machine learning model 115.
[0083] In step 835, the method 800 may include the data processing system 105 selecting the second operation based on the level of computing resources and the accuracy threshold. For example, the replacement selector 125 may select the replacement operation 130 from a set of replacement operations 130 that may approximate the first operation based on the accuracy level of each replacement operation 130, the level of computing resources consumed by each replacement operation 130, and the accuracy threshold. The replacement selector 125 may select the replacement operation 130 from the set of replacement operations that consumes the least amount of processing resources but has a level of accuracy greater than the accuracy threshold. The replacement selector 125 may select the replacement operation 130 with a tolerable level of accuracy loss.
[0084] In step 840, the method 800 may include transforming the model using the second operation by the data processing system 105. For example, the replacement selector 125 may generate an updated machine learning model 135 by replacing the first non-linear operation 210 with the second replacement operation 130. The method of transforming the machine learning model 135 may be iterative. For example, the operation identifier 120 may identify the first non-linear operation 210 and the second non-linear operation 210. The replacement selector 125 may identify a set of replacement operations 130 that may approximate the first non-linear operation. The replacement selector 125 may execute the machine learning model 115 with each of the linear operations 130 that replace the first non-linear operation 210, and select a linear operation 130 to replace the first non-linear operation 210. The replacement selector 125 may then transform the machine learning model 115 by replacing the first non-linear operation 210 with the selected replacement operation 130. Once the model is transformed to replace the first non-linear operation 210, the replacement selector 125 may replace the second non-linear operation 210. The replacement selector 125 may identify a set of replacement operations 130 that may approximate the second non-linear operation 210. The replacement selector 125 may execute the machine learning model 115 with each of the linear operations 130 that replace the second non-linear operation 210, and select a linear operation 130 to replace the second non-linear operation 210. The replacement selector 125 may then transform the machine learning model 115 again by replacing the second non-linear operation 210 with the selected replacement operation 130.
[0085] Once the machine learning model 115 is transformed to generate the updated machine learning model 135, the deployer 140 can deploy the updated machine learning model 135 to the computing system 150 of the vehicle 145. The deployer 140 can include a machine learning model deployment tool to deploy the updated machine learning model 135 to the vehicle platform. For example, the deployer 140 can deploy the updated machine learning model 135 to the computing system 150 of the vehicle during a provisioning phase, during vehicle service, via an over-the-air (OTA) update, or via a software update via at least one cable, wire, connector, wireless network, cellular network, or other communication medium or channel.
[0086] Fig. 9 An exemplary block diagram of an example computer system, computer device data processing system 105 , is depicted. Fig. 9 The computer environment described in the foregoing may be used to implement the computing system 150. The data processing system 105 may include or may be used to implement the data processing system or its components. The data processing system 105 includes at least one bus 925 or other communication components for communicating information, and at least one processor 930 or processing circuit coupled to the bus 925 for processing information. The data processing system 105 may also include one or more processors 930 or processing circuits coupled to the bus for processing information. The data processing system 105 also includes at least one main memory 910 coupled to the bus 925, such as a random access memory (RAM) or other dynamic storage device, for storing information and instructions to be executed by the processor 930. The main memory 910 may be used to store information during the execution of instructions by the processor 930. The data processing system 105 may also include at least one read-only memory (ROM) 915 or other static storage device coupled to the bus 925 for storing static information and instructions for the processor 930. A storage device 920 (such as a solid-state device, a magnetic disk, or an optical disk) may be coupled to the bus 925 to store information and instructions permanently.
[0087] The data processing system 105 may be coupled to a display 900, such as a liquid crystal display or an active matrix display, via a bus 925 for displaying information to a user, such as a driver or other end user of the electric vehicle 145. An input device 905, such as a keyboard interface or a voice interface, may be coupled to the bus 925 for communicating information and commands to the processor 930. The input device 905 may include a touch screen display 900. The input device 905 may also include a cursor control, such as a mouse, trackball, or cursor direction keys, for communicating directional information and command selections to the processor 930 and for controlling cursor movement on the display 900.
[0088] The processes, systems, and methods described herein may be implemented by the data processing system 105 in response to the processor 930 executing the instruction arrangement contained in the main memory 910. Such instructions may be read into the main memory 910 from another computer-readable medium, such as the storage device 920. The execution of the instruction arrangement contained in the main memory 910 causes the data processing system 105 to perform the illustrative processes described herein. One or more processors in a multi-processing arrangement may also be used to execute the instructions contained in the main memory 910. Hard-wired circuitry may be used in place of or in combination with software instructions and the systems and methods described herein. The systems and methods described herein are not limited to any specific combination of hardware circuitry and software.
[0089] Although already Fig. 9 An exemplary computing system is described in the specification, but the subject matter including the operations described in this specification may be implemented in other types of digital electronic circuits, or implemented in computer software, firmware, or hardware (including the structures disclosed in this specification and their structural equivalents), or in a combination of one or more of them.
[0090] Some descriptions herein emphasize the structural independence of aspects of system components or the grouping of operations and responsibilities of these system components. Other groupings that perform similar overall operations are also within the scope of this application. Modules can be implemented in hardware or as computer instructions on non-transient computer-readable storage media, and modules can be distributed across various hardware or computer-based components.
[0091] The system described above can provide any one of these components or multiple components of each component, and these components can be provided on a stand-alone system, or on multiple examples in a distributed system. In addition, the system and method described above can be provided as one or more computer-readable programs or executable instructions, which are included in one or more products or in a manufactured product. The manufactured product can be a cloud storage, a hard disk, a CD-ROM, a flash card, a PROM, a RAM, a ROM, or a tape. In general, a computer-readable program can be implemented in any programming language (such as LISP, PERL, C, C++, C#, PROLOG), or implemented in any byte code language (such as JAVA). The software program or executable instruction can be stored as an object code on one or more products or in a manufactured product.
[0092] Example and non-limiting module implementation elements include sensors that provide any value identified herein, sensors that provide any value that is a predecessor of a value identified herein, data link or network hardware including a communication chip, an oscillator crystal, a communication link, a cable, a twisted pair, a coaxial line, a shielded line, a transmitter, a receiver or a transceiver, a logic circuit, a hard-wired logic circuit, a reconfigurable logic circuit in a specific non-transient state configured according to a module specification, any actuator including at least an electric actuator, a hydraulic actuator or a pneumatic actuator, a solenoid, an operational amplifier, an analog control element (spring, filter, integrator, adder, divider, gain element) or a digital control element.
[0093] The subject matter and operations described in this specification may be implemented in digital electronic circuits, or in computer software, firmware or hardware, including the structures disclosed in this specification and their structural equivalents, or in a combination of one or more of them. The subject matter described in this specification may be implemented as one or more computer programs (e.g., one or more computer program instruction circuits), which are encoded on one or more computer storage media for execution by a data processing device or for controlling the operation of a data processing device. Alternatively or additionally, program instructions may be encoded on an artificially generated propagation signal, such as a machine-generated electrical, optical or electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device to be executed by a data processing device. A computer storage medium may be or be included in a computer-readable storage device, a computer-readable storage substrate, a random or serial access memory array or device, or a combination of one or more of them. Although a computer storage medium is not a propagation signal, a computer storage medium may be a source or destination of computer program instructions encoded in an artificially generated propagation signal. The computer storage medium may also be or be included in one or more separate components or media (e.g., multiple CDs, disks, or other storage devices including cloud storage). The operations described in this specification may be implemented as operations performed by a data processing device on data stored on one or more computer-readable storage devices or received from other sources.
[0094] The terms "computing device," "component," or "data processing apparatus," etc., cover various apparatuses, devices, and machines for processing data, including, for example, a programmable processor, a computer, a system on a chip, or a plurality or combination of the foregoing. The apparatus may include dedicated logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit). In addition to hardware, the apparatus may also include code that creates an execution environment for the computer program in question, for example, code that constitutes processor firmware, a protocol stack, a database management system, an operating system, a cross-platform operating environment, a virtual machine, or a combination of one or more of them. The apparatus and execution environment may implement a variety of different computing model infrastructures, such as web services, distributed computing, and grid computing infrastructures.
[0095] A computer program (also referred to as a program, software, software application, application, script, or code) may be written in any form of programming language, including compiled or interpreted, declarative or procedural, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, object, or other unit suitable for use in a computing environment. A computer program may correspond to a file in a file system. A computer program may be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple collaborative files (e.g., files storing one or more modules, subroutines, or code portions). A computer program may be deployed to execute on one or more computers located in one location or distributed in multiple locations and interconnected by a communications network.
[0096] The processes and logic flows described in this specification may be performed by one or more programmable processors executing one or more computer programs to perform actions by operating on input data and generating output. The processes and logic flows may also be performed by special purpose logic circuits, and the apparatus may also be implemented as special purpose logic circuits, such as FPGAs (field programmable gate arrays) or ASICs (application specific integrated circuits). Devices suitable for storing computer program instructions and data may include non-volatile memory, media, and storage devices, including, for example, semiconductor memory devices such as EPROMs, EEPROMs, and flash memory devices; disks, such as internal hard disks or removable disks; magneto-optical disks; and CD ROM and DVD-ROM disks. The processor and memory may be supplemented by or incorporated into special purpose logic circuits.
[0097] The subject matter described herein can be implemented in a computing system that includes a back-end component, such as a data server, or includes a middleware component, such as an application server, or includes a front-end component, such as a client computer with a graphical user interface or a web browser, through which a user can interact with the implementation of the subject matter described in this specification, or includes a combination of one or more such back-end, middleware, or front-end components. The components of the system can be interconnected by digital data communication (such as a communication network) in any form or medium. Examples of communication networks include local area networks ("LANs") and wide area networks ("WANs"), internets (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks).
[0098] Although operations are depicted in a particular order in the drawings, these operations need not be performed in the particular order shown or in sequential order, and not all of the operations shown need be performed. The actions described herein may be performed in a different order.
[0099] Now that some exemplary implementations have been described, it is apparent that the foregoing is illustrative rather than restrictive and has been presented by way of example. Specifically, although many of the examples presented herein relate to specific combinations of method actions or system elements, these actions and these elements may be combined in other ways to achieve the same purpose. The actions, elements, and features discussed in conjunction with one implementation are not intended to be excluded from similar roles in other implementations.
[0100] The words and terms used herein are for descriptive purposes and should not be construed as limiting. The use of "including," "comprising," "having," "containing," "involving," "characterized by," and variations thereof herein is intended to encompass the items listed thereafter, their equivalents and additional items, and alternative implementations consisting solely of the items listed thereafter. In one implementation, the systems and methods described herein consist of one, each combination of more than one, or all of the elements, acts, or components described.
[0101] Any implementation or element or action of the system and method mentioned in the singular form herein may also include an implementation comprising a plurality of these elements, and any plural form of any implementation or element or action herein may also include an implementation comprising only a single element. Reference in the singular or plural form is not intended to limit the currently disclosed system or method, its parts, actions or elements to a single or multiple configurations. Reference to any action or element based on any information, action or element may include a specific implementation in which the action or element is based at least in part on any information, action or element.
[0102] Any implementation disclosed herein may be combined with any other implementation or embodiment, and references to "an implementation," "some implementations," "an implementation," etc. are not necessarily mutually exclusive, but are intended to indicate that a particular feature, structure, or characteristic described in conjunction with an implementation may be included in at least one implementation or embodiment. Such terms as used herein do not necessarily all refer to the same implementation. Any implementation may be combined, inclusively or exclusively, with any other implementation in any manner consistent with the aspects and implementations disclosed herein.
[0103] References to "or" may be interpreted as inclusive, such that any term described using "or" may indicate any of a single, more than one, and all of the terms. References to at least one of a conjunctive list of terms may be interpreted as inclusive OR to indicate any of a single, more than one, and all of the terms. For example, references to "at least one of 'A' and 'B'" may include only "A," only "B," and both "A" and "B." Such references used in conjunction with "including" or other open-ended terms may include additional items.
[0104] Where a technical feature in the drawings, detailed description or any claims is followed by a reference numeral, the reference numeral is included to enhance the intelligibility of the drawings, detailed description and claims. Therefore, the presence or absence of a reference numeral has no limiting effect on the scope of any claim element.
[0105] Without departing substantially from the teachings and advantages of the subject matter disclosed herein, modifications may be made to the elements and actions, such as changes in size, dimensions, structure, shape and proportion, parameter values, mounting arrangements, use of materials, color, orientation of the various elements. For example, an element shown as being integrally formed may be composed of multiple parts or elements, the position of elements may be reversed or otherwise changed, and the nature or number or position of discrete elements may be changed or varied. Other substitutions, modifications, changes and omissions may also be made in the design, operating conditions and arrangement of the disclosed elements and operations without departing from the scope of the present disclosure.
[0106] For example, the description of positive and negative electrical characteristics may be reversed. For example, the machine learning model transformation described herein may be applied to other systems besides vehicle operation and control. For example, the machine learning model transformation technology may be applied to vehicle charging stations, vehicle chargers, vehicle design, etc. An element described as a negative element may be configured as a positive element instead and an element described as a positive element may be configured as a negative element instead. For example, an element described as having a first polarity may have a second polarity, while an element described as having a second polarity may have a first polarity. Further relative parallel, vertical, vertical or other positioning or orientation descriptions include changes within + / -10% or + / -10 degrees of pure vertical, parallel or vertical positioning. Unless otherwise expressly stated, references to "approximately", "substantially" or other degree terms include changes of + / -10% with a given measurement, unit or range. The connected elements may be electrically connected, mechanically connected or physically connected to each other directly or through intermediate elements. Scope of the systems and methods described herein is thus indicated by the appended claims rather than the foregoing description, and changes that come within the meaning and range of equivalency of the claims are embraced therein.
Claims
1. A system, comprising: A data processing system comprising a memory device coupled to one or more processors, the data processing system being configured to: receiving a model including a plurality of first operations trained by machine learning, the model being used to generate outputs for operating a vehicle; searching the model to identify a nonlinear operation among the plurality of first operations; selecting a second operation from a plurality of second operations that approximates the nonlinear operation, the selecting being based on a level of computational resources consumed by the plurality of second operations, an accuracy of a model generated using the plurality of second operations, or an accuracy threshold for operating the vehicle; as well as The nonlinear operation is replaced with a second operation in the model to produce a second output.
2. The system of claim 1, wherein: The second operation maps to the non-linear operation and uses fewer computational resources relative to the non-linear operation.
3. The system according to claim 1, comprising: The data processing system is used to: receiving a second model, wherein an output of the model is an input to the second model; searching the second model to identify a nonlinear operation among a plurality of third operations; selecting a fourth operation from the plurality of second operations that approximates a nonlinear operation from the plurality of third operations, the selecting being based on a level of computational resources consumed by the plurality of second operations, an accuracy of a second model generated using the plurality of second operations, and an accuracy threshold for operating the vehicle; as well as A nonlinear operation in the plurality of third operations is replaced with a fourth operation in the model.
4. The system according to claim 1, comprising: The data processing system is used to: receiving a graph representing the model, the graph comprising a plurality of nodes representing the plurality of first operations of the model, the graph comprising a plurality of edges between the plurality of nodes, the plurality of nodes indicating that an output of one of the plurality of first operations is an input to another of the plurality of first operations; identifying a set of nodes among the plurality of nodes for measuring the accuracy; In response to determining that the node is separated from a second node of the plurality of nodes representing the nonlinear operation by less than a threshold number of nodes or edges, selecting from the set of nodes a node representing an operation to be performed based on an output of the nonlinear operation; as well as The accuracy of the plurality of second operations is determined based on values generated by the model at outputs of the operations using the plurality of second operations.
5. The system according to claim 1, comprising: The data processing system is used to: replacing the nonlinear operation with the second operation; executing the model using a second operation of the plurality of second operations to generate an accuracy of the second operation; replacing the nonlinear operation with a third operation among the plurality of second operations; executing the model using the third operation to generate an accuracy of the third operation; optimizing an objective function based on the accuracy of the second operation, the level of computing resources consumed by the second operation, the accuracy of the third operation, and the level of computing resources consumed by the third operation; as well as The second operation is selected based on optimization of the objective function.
6. The system according to claim 1, wherein the data processing system is configured to: training the model using a training dataset; and In response to completion of training the model, the second operation is selected to replace the non-linear operation.
7. The system according to claim 1, comprising: The data processing system is used to: The library is searched for operations that approximate the non-linear operation to identify the plurality of second operations.
8. The system according to claim 1, comprising: The data processing system is used to: executing the model using the second operation to generate at least one value at a point within the model; determining an accuracy of the second operation based on the at least one value of the point; as well as The second operation is selected from the plurality of second operations based on the accuracy.
9. The system according to claim 1, comprising: The data processing system is used to: The model is searched for an operation in the plurality of first operations that consumes a certain level of computing resources greater than a threshold to identify the non-linear operation.
10. The system according to claim 1, comprising: The data processing system is used to: searching the model to identify a nonlinear operation in the plurality of first operations, To identify the nonlinear operation.
11. The system of claim 1, wherein: The plurality of second operations are linear operations that approximate the non-linear operation.
12. A method comprising: receiving, by a data processing system including a memory device coupled to one or more processors, a model trained by machine learning including a plurality of first operations, the model generating outputs for operating a vehicle; searching, by the data processing system, the model to identify a nonlinear operation in the plurality of first operations; selecting, by the data processing system, a second operation from a plurality of second operations that approximates the nonlinear operation, the selecting being based on a level of computational resources consumed by the plurality of second operations, an accuracy of the model generated using the plurality of second operations, and an accuracy threshold for operating the vehicle; as well as The nonlinear operation is replaced by a second operation in the model by the data processing system to generate a second output.
13. The method according to claim 12, wherein: The second operation maps to the non-linear operation and uses fewer computational resources relative to the non-linear operation.
14. The method according to claim 12, comprising: receiving, by the data processing system, a second model, wherein an output of the model is an input to the second model; searching, by the data processing system, the second model to identify a nonlinear operation in a plurality of third operations; selecting, by the data processing system, a fourth operation from the plurality of second operations that approximates a nonlinear operation in the plurality of third operations, the selection being based on a level of computing resources consumed by the plurality of second operations, an accuracy of a second model generated using the plurality of second operations, and an accuracy threshold for operating the vehicle; as well as A nonlinear operation in the plurality of third operations is replaced by the data processing system with a fourth operation in the model.
15. The method according to claim 12, comprising: receiving, by the data processing system, a graph representing the model, the graph comprising a plurality of nodes representing the plurality of first operations of the model, the graph comprising a plurality of edges between the plurality of nodes, the plurality of nodes indicating that an output of one of the plurality of first operations is an input to another of the plurality of first operations; identifying, by the data processing system, a set of nodes among the plurality of nodes for measuring the accuracy; In response to determining that the node is separated from a second node of the plurality of nodes representing the nonlinear operation by less than a threshold number of nodes or edges, selecting, by the data processing system, from the set of nodes a node representing an operation to be performed based on an output of the nonlinear operation; as well as The accuracy of the plurality of second operations is determined by the data processing system based on values generated by the model at outputs of the operations using the plurality of second operations.
16. The method according to claim 12, comprising: replacing the nonlinear operation by the data processing system with the second operation; executing, by the data processing system, the model using a second operation of the plurality of second operations to generate an accuracy of the second operation; replacing the nonlinear operation by the data processing system with a third operation among the plurality of second operations; executing the model using the third operation by the data processing system to generate an accuracy of the third operation; optimizing, by the data processing system, an objective function based on the accuracy of the second operation, the level of computing resources consumed by the second operation, the accuracy of the third operation, and the level of computing resources consumed by the third operation; as well as The second operation is selected by the data processing system based on optimization of the objective function.
17. The method according to claim 12, comprising: executing, by the data processing system, the model using the second operation to generate at least one value at a point within the model; determining, by the data processing system, an accuracy of the second operation based on the at least one value of the point; as well as The second operation is selected, by the data processing system, from among the plurality of second operations based on the accuracy.
18. A vehicle, comprising: A data processing system comprising a memory device coupled to one or more processors, the data processing system being configured to: receiving a model trained by machine learning including a plurality of first operations, the model being transformed to replace nonlinear operations of the model with second operations of a plurality of second operations, the second operations being selected from the plurality of second operations to approximate the nonlinear operations, the selection being based on a level of computing resources consumed by the plurality of second operations, an accuracy of the model generated using the plurality of second operations, and an accuracy threshold for operating the vehicle; receiving sensor data from at least one sensor of the vehicle; as well as The model is executed with sensor data as input to generate outputs for operating the vehicle.
19. The vehicle of claim 18, wherein: The second operation maps to the non-linear operation and uses fewer computational resources relative to the non-linear operation.
20. The vehicle of claim 18, wherein: Responsive to completion of training the model, the second operation is selected to replace the nonlinear operation.
Citation Information
Cited By
Nanometer microneedle device capable of adaptively adjusting penetration depth
CN121243604A
