CNN Layer Conversion for Batch Normalization-Free Inference
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing convolutional neural networks (CNNs) incur high processing costs due to the presence of regularization layers, particularly batch normalization layers, which complicate inference processes.
Innovation Solution
A method to convert CNNs by generating a second convolutional layer based on the parameters of a regularization layer and an adjacent convolutional layer, effectively replacing the regularization layer to reduce processing costs and maintain inference accuracy.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a regularization layer (batch normalization layer) is included in the CNN to improve training stability and convergence, then the model performance is improved, but the processing cost and computational complexity during inference increase
Solution Approach 1:
The patent merges the regularization layer with the adjacent convolutional layer by integrating the batch normalization parameters (moving mean, moving variance) into the convolutional layer's weight and bias parameters. This combination eliminates the need for separate regularization layer computation during inference, reducing processing cost while maintaining the normalization effect that improves model performance.
Solution Approach 2:
The patent extracts the essential functionality of the regularization layer (normalization effect) and incorporates it into the convolutional layer parameters. By extracting the moving mean and moving variance from the regularization layer and using them to transform convolutional parameters, the invention removes the need for the regularization layer during inference while preserving its performance-benefiting effects.
2Measurement precision
If multiple layers (convolutional layer and regularization layer) are used to achieve better processing results, then the inference accuracy is improved, but the number of processing steps and time increase
Solution Approach 1:
The patent combines multiple layers into a single convolutional layer by integrating the regularization functionality into the convolutional parameters. This merging reduces the number of processing steps during inference from two separate layer operations to one unified operation, decreasing inference time while maintaining the accuracy benefits of both layers.
Solution Approach 2:
The patent performs the normalization computation in advance during the parameter conversion process. By pre-calculating the transformed weight and bias parameters that incorporate the batch normalization effect, the invention eliminates the need for runtime normalization computations, reducing inference time while preserving accuracy.
3Adaptability or versatility
If the original CNN structure with separate convolutional layer and regularization layer is maintained, then the model flexibility and adaptability are preserved, but the computational efficiency and processing speed decrease
Solution Approach 1:
The patent merges the convolutional layer and regularization layer into a single unified layer with transformed parameters. This combination maintains the adaptive normalization functionality while reducing the computational overhead of processing two separate layers, thereby improving computational efficiency without sacrificing model flexibility.
Solution Approach 2:
The patent transforms the convolutional layer parameters (weight and bias) using the regularization layer's moving mean and moving variance. This parameter transformation allows the unified layer to adaptively normalize inputs during inference, preserving the adaptability benefits of the original structure while achieving higher computational efficiency through reduced processing steps.
Data Source
AI summary
The present invention provides a trained model conversion method, an inference method, a trained model conversion apparatus, a trained model, and an inference apparatus that are capable of reducing the cost of processing by a regularization layer. A trained model conversion method according to an aspect of the present invention includes a convolutional layer generation step of generating, for a trained convolutional neural network including at least one regularization layer, a second convolutional layer on the basis of a trained parameter of the regularization layer and a trained parameter of a first convolutional layer adjacent to the regularization layer; and a converted model generation step of replacing the regularization layer and the first convolutional layer with the second convolutional layer to generate a converted model which is a converted trained model.


