CN117273165A - Network model fine-tuning method, system and equipment suitable for community scene - Google Patents

Network model fine-tuning method, system and equipment suitable for community scene Download PDF

Info

Publication number
CN117273165A
CN117273165A CN202311214817.4A CN202311214817A CN117273165A CN 117273165 A CN117273165 A CN 117273165A CN 202311214817 A CN202311214817 A CN 202311214817A CN 117273165 A CN117273165 A CN 117273165A
Authority
CN
China
Prior art keywords
scene
model
network model
fine tuning
community
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311214817.4A
Other languages
Chinese (zh)
Inventor
韩运恒
徐震
陈长愿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jieyi Technology Co ltd
Original Assignee
Shenzhen Jieyi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Jieyi Technology Co ltd filed Critical Shenzhen Jieyi Technology Co ltd
Priority to CN202311214817.4A priority Critical patent/CN117273165A/en
Publication of CN117273165A publication Critical patent/CN117273165A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Tourism & Hospitality (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Medical Informatics (AREA)
  • Mathematical Physics (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a network model fine tuning method, system and equipment adapting to community scenes, wherein the method comprises the steps of carrying out model pretreatment on an original community scene network model to obtain a pretreated scene network model, and screening model parameters from the corresponding pretreated scene network model based on an obtained scene fine tuning request to obtain a fine tuning original data set; constructing a fine tuning auxiliary model according to the fine tuning original data set and the acquired fine tuning incremental data set, and accessing an original community scene network model; inputting the acquired scene information parameters into an original community scene network model and a fine tuning auxiliary model for training; when training is carried out until the original community scene network model and the fine tuning auxiliary model are converged, fine tuning is carried out on the original community scene network model based on fine tuning auxiliary parameters of the fine tuning auxiliary model so as to obtain a fine-tuned scene network model; the method has the effects of shortening the model training period of the network model of the community scene and improving the fine tuning efficiency of the network model.

Description

Network model fine-tuning method, system and equipment suitable for community scene
Technical Field
The application relates to the technical field of intelligent communities, in particular to a network model fine tuning method, system and equipment adapting to community scenes.
Background
The intelligent community is an integrated application of making full use of new generation information technologies such as the Internet of things, cloud computing and the mobile Internet, and forms a novel community management mode based on informatization and intelligent social management and service.
The network model of the intelligent community integration application is large in scale due to the variability and complexity of community scenes, when the community scenes are changed greatly or the types of community scenes are increased due to the living demands of residents, the data are generally increased in an incremental iteration mode, and the network model training set is also required to be adjusted along with the network model training set to obtain a more fitting model.
In the face of model training of a large-scale data set, a great deal of time is spent in learning training of a network model for parameter adjustment test, and the period from data acquisition to training completion is long; when the community scene is changed or newly added, the training time of the large-scale data set model is longer due to the complexity and diversity of the community scene, and the fine tuning efficiency of the network model is low; there is room for improvement.
Disclosure of Invention
In order to shorten the model training period which is required to be spent by the network model of the community scene when the community scene is changed, the fine tuning efficiency of the network model is improved; the application provides a network model fine tuning method, system and equipment adapting to community scenes.
The first technical scheme adopted by the invention of the application is as follows:
a network model fine tuning method adapting to community scenes comprises the following steps:
performing model preprocessing on the original community scene network model to obtain a preprocessed scene network model;
screening model parameters from the corresponding preprocessed scene network model based on the acquired scene fine tuning request to obtain a fine tuning original data set;
constructing a fine tuning auxiliary model according to the fine tuning original data set and the acquired fine tuning incremental data set; accessing the fine tuning auxiliary model into the original community scene network model;
inputting the acquired scene information parameters into the original community scene network model and the fine tuning auxiliary model for training; and when training is performed until the original community scene network model and the fine tuning auxiliary model are converged, fine tuning is performed on the original community scene network model based on fine tuning auxiliary parameters of the fine tuning auxiliary model so as to obtain a fine-tuned scene network model.
By adopting the technical scheme, when the scene of the community is changed, the network model of the original community scene is preprocessed to obtain the preprocessed scene network model, the corresponding preprocessed scene network model is subjected to model parameter screening based on the scene fine adjustment request sent by the user to obtain a fine adjustment original data set, and the model parameters in the original network model related to the changed community scene in the original data set are subjected to feature extraction, so that model parameter freezing or model parameter migration fine adjustment is determined based on the acquired scene information parameters: for example, model parameters of shallow layers such as building shapes, community areas, road planning and the like of community buildings in some community scenes which are not changed are directly frozen, and model parameters such as regional shapes in the community scenes which are directly related to the changes, living appliances in the scenes and the like are migrated and finely adjusted, so that iterative fine adjustment optimization can be carried out on the model parameters in the original scene network model in a targeted manner, the model training period which is required to be spent when the network model of the community scenes is shortened is greatly shortened, and the fine adjustment efficiency of the network model is improved.
In a preferred example, the present application: the original community scene network model comprises a community scene image; the method for preprocessing the model of the original community scene network model to obtain a preprocessed scene network model specifically comprises the following steps:
selecting and identifying a community scene image in an original community scene network model, and extracting feature mapping information generated during identification; converting the feature mapping information into a model fixed point number with fixed digits based on preset image selection precision;
when the fixed number of the fixed-bit model exceeds a preset fixed number expression range, carrying out unified quantization bit rule quantization on all network parameter layers in the original community scene network model to obtain a preprocessed scene network model;
or alternatively, the first and second heat exchangers may be,
and when the fixed-bit number of the model fixed-bit number does not exceed the preset fixed-bit number expression range, determining the maximum quantization bit number of each network parameter layer in the original community scene network model in an irregular quantization mode to obtain a preprocessed scene network model.
By adopting the technical scheme, the community scene image with higher image precision in the original community scene network model is selected, the feature mapping information generated in the identification process is extracted, then the feature mapping information in the original community scene network model is converted into the fixed-bit number model fixed-point number, and at the moment, two situations exist: the method is that the converted fixed-bit number of the model exceeds the number of the expression range of the fixed-bit number, and at the moment, the unified quantization bit number of each network layer number in the original community scene network model is required to be quantized in a regular quantization mode; and the other mode is that the number of the fixed-point number of the converted model does not exceed the expression range of the fixed-point number, each network layer number in the original community scene network model can be quantized in an irregular quantization mode, namely, the maximum quantization fixed-point number met in each layer of network model is determined in an irregular interlayer mode, so that the preprocessed scene network model with smaller storage space is saved, and the original community scene network model is optimized in a quantization mode, so that model parameters of a shallow layer can be frozen in the subsequent fine adjustment process of the network model.
In a preferred example, the present application: the step S2 of screening model parameters from the corresponding preprocessed scene network model based on the acquired scene fine tuning request to obtain a fine tuning original data set specifically comprises the following steps:
determining a fine tuning scene and a fine tuning range of the scene network model based on the acquired scene fine tuning request;
and screening model parameters from the corresponding preprocessed scene network model according to the fine tuning scene and the fine tuning range of the scene model to obtain a fine tuning original data set.
By adopting the technical scheme, corresponding fine tuning scenes, fine tuning scene ranges and the like in the whole community scene are determined based on the acquired content of the scene fine tuning request, the scene ranges which need fine tuning and the scene ranges which do not need fine tuning are determined in the whole preprocessed scene network model, and for the model parameters of the scene ranges which do not need fine tuning, the original model parameters of the model are determined from the preprocessed scene network model and used as frozen model parameter training data in model fine tuning training; the frozen original model parameters are divided into fine-tuning original data sets to serve as the original model parameters before model fine-tuning training.
In a preferred example, the present application: the fine tuning auxiliary model is built according to the fine tuning original data set and the acquired fine tuning incremental data set; and accessing the fine tuning auxiliary model into the original community scene network model, wherein the fine tuning auxiliary model comprises an encoder and a decoder, and specifically comprises the following steps:
the encoder is used for extracting scene characteristic information in the fine adjustment original data set and the fine adjustment incremental data set; the decoder is used for restoring target scene information from the scene characteristic information;
adding scene characteristic information of an encoder of the fine tuning auxiliary model to a corresponding model position in the original community scene network model according to the acquired scene fine tuning request;
and adding the target scene information of the decoder of the fine tuning auxiliary model to the corresponding model position in the original community scene network model according to the acquired scene fine tuning request.
By adopting the technical scheme, a user can automatically construct an incremental data set through manual input or through a data acquisition module; the encoder is used for extracting scene characteristic information in the fine adjustment original data set and the fine adjustment incremental data set and adding the scene characteristic information to corresponding model positions in the original community scene network model; the decoder is used for restoring the scene characteristic information in the scene model range to be trimmed according to the acquired scene trimming request to obtain target scene information and adding the target scene information to the corresponding model position in the original community scene network model, so that the model trimming result in the original community scene network model is changed, and the distribution adjustment of the trimming auxiliary model to the trimming result of the original community scene network model is realized.
In a preferred example, the present application: after inputting the acquired scene information parameters into the original community scene network model and the fine tuning auxiliary model for training, the method comprises the following steps:
a preset learning rate fine tuning algorithm determines a learning rate range of an ith iteration period, wherein i is not less than 1;
and adjusting the learning rate of the original community scene network model in different iteration periods and/or different model layers according to the preset learning rate fine adjustment algorithm.
By adopting the technical scheme, in the fine tuning training of the community scene network model, the learning rate of the original community scene network model in different iteration periods and different network model layers is adjusted according to a preset learning rate fine tuning algorithm; for shallow features of community scenes which are not changed in the plurality of community scenes, and neglecting differences of the deep and shallow features; the learning rate fine tuning algorithm can adopt a smaller learning rate and ignore the difference of the deep and shallow layer characteristics; if aiming at a changed community scene, when the model is finely adjusted, the deep feature difference is larger, and a larger learning rate and a wider learning range are required to be set; according to the preset learning rate fine tuning algorithm, the learning rates of the original community scene network model in different iteration periods and different levels are adjusted, so that the original community scene network model is enabled to be converged rapidly, and rapid iterative training of changed or newly added model parameters is facilitated.
The second object of the present application is achieved by the following technical scheme:
a network model fine-tuning system adapted to a community scenario, comprising:
the preprocessing module is used for carrying out model preprocessing on the original community scene network model to obtain a preprocessed scene network model; the screening parameter module is used for screening model parameters from the corresponding preprocessed scene network model based on the acquired scene fine adjustment request so as to obtain a fine adjustment original data set;
the access module is used for constructing a fine-tuning auxiliary model according to the fine-tuning original data set and the acquired fine-tuning incremental data set; accessing the fine tuning auxiliary model into the original community scene network model;
the training fine tuning module is used for inputting the acquired scene information parameters into the original community scene network model and the fine tuning auxiliary model for training; and when training is performed until the original community scene network model and the fine tuning auxiliary model are converged, fine tuning is performed on the original community scene network model based on fine tuning auxiliary parameters of the fine tuning auxiliary model so as to obtain a fine-tuned scene network model.
By adopting the technical scheme, the model parameters in the original network model related to the changed community scene in the original data set are subjected to feature extraction in the fine-tuning original data set, so that the model parameter freezing or the model parameter migration fine-tuning is determined based on the acquired scene information parameters: for example, model parameters of shallow layers such as building shapes, community areas, road planning and the like of community buildings in some community scenes which are not changed are directly frozen, and model parameters such as regional shapes in the community scenes which are directly related to the changes, living appliances in the scenes and the like are migrated and finely adjusted, so that iterative fine adjustment optimization can be carried out on the model parameters in the original scene network model in a targeted manner, the model training period which is required to be spent when the network model of the community scenes is shortened is greatly shortened, and the fine adjustment efficiency of the network model is improved.
In a preferred example, the present application: the preprocessing module comprises:
the image information extraction sub-module is used for selecting and identifying the community scene image in the original community scene network model and extracting feature mapping information generated during identification;
the information conversion sub-module is used for converting the feature mapping information into a model fixed point number with a fixed bit number based on a preset image selection precision;
the rule quantization sub-module is used for carrying out rule quantization of unified quantization bits on all network parameter layers in the original community scene network model to obtain a preprocessed scene network model when the fixed-bit number of the model exceeds a preset fixed-bit number expression range;
and the irregular quantization sub-module is used for determining the maximum quantization digit of each network parameter layer in the original community scene network model in an irregular quantization mode to obtain a preprocessed scene network model when the fixed-digit model fixed-point number does not exceed a preset fixed-point number expression range.
By adopting the technical scheme, the converted fixed-point number of the model with the fixed number exceeds the number of the fixed-point number expression range, and at the moment, the unified quantization number of digits in each network layer number in the original community scene network model is required to be quantized in a regular quantization mode; and the other mode is that the number of the fixed-point number of the converted model does not exceed the expression range of the fixed-point number, each network layer number in the original community scene network model can be quantized in an irregular quantization mode, namely, the maximum quantization fixed-point number met in each layer of network model is determined in an irregular interlayer mode, so that the preprocessed scene network model with smaller storage space is saved, and the original community scene network model is optimized in a quantization mode, so that model parameters of a shallow layer can be frozen in the subsequent fine adjustment process of the network model.
In a preferred example, the present application: the screening parameter module comprises:
the scene range determination submodule is used for determining a fine tuning scene and a fine tuning range of the scene network model based on the acquired scene fine tuning request;
and the screening sub-module is used for screening model parameters from the corresponding preprocessed scene network model according to the fine tuning scene and the fine tuning range of the scene model so as to obtain a fine tuning original data set.
By adopting the technical scheme, the corresponding trimming scene, trimming scene range and the like in the whole community scene are determined based on the acquired content of the scene trimming request, the scene range needing trimming and the scene range not needing trimming are determined in the whole preprocessed scene network model, and for the model parameters of the scene range not needing trimming, the original model parameters using the model are determined from the preprocessed scene network model and are used as frozen model parameter training data during model trimming training. The frozen original model parameters are divided into fine-tuning original data sets to serve as the original model parameters before model fine-tuning training.
The third object of the present application is achieved by the following technical scheme:
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the network model tuning method adapted to community scenarios described above when the computer program is executed.
The fourth object of the present application is achieved by the following technical scheme:
a computer readable storage medium storing a computer program which when executed by a processor performs the steps of the network model tuning method adapted to a community scenario described above.
In summary, the present application includes at least one of the following beneficial technical effects:
1. when the scene of the community is changed, preprocessing the network model of the original community scene to obtain a preprocessed scene network model, screening model parameters of the corresponding preprocessed scene network model based on a scene fine-tuning request sent by a user to obtain a fine-tuning original data set, and extracting the model parameters in the original network model related to the changed community scene in the fine-tuning original data set to perform characteristic extraction so as to determine to perform model parameter freezing or model parameter migration fine tuning based on the acquired scene information parameters: if model parameters of shallow layers such as building shapes, community areas, road planning and the like of community buildings in some community scenes which are not changed are directly frozen, and model parameters such as regional shapes in the community scenes which are directly related to the changes, living appliances in the scenes and the like are migrated and finely adjusted, so that iterative fine adjustment optimization can be carried out on the model parameters in the original scene network model in a targeted manner, the model training period which is required to be spent when the network model of the community scene is shortened in the community scene change is greatly shortened, and the fine adjustment efficiency of the network model is improved;
2. The fine-tuning original data set is used for extracting the characteristics of model parameters in an original network model related to the changed community scene in the original data set, so that model parameter freezing or model parameter migration fine-tuning is carried out based on the acquired scene information parameter decision: if model parameters of shallow layers such as building shapes, community areas, road planning and the like of community buildings in some community scenes which are not changed are directly frozen, and model parameters such as regional shapes in the community scenes which are directly related to the changes, living appliances in the scenes and the like are migrated and finely adjusted, so that iterative fine adjustment optimization can be carried out on the model parameters in the original scene network model in a targeted manner, the model training period which is required to be spent when the network model of the community scene is shortened in the community scene change is greatly shortened, and the fine adjustment efficiency of the network model is improved;
3. selecting a community scene image with higher image precision in an original community scene network model, extracting feature mapping information generated in the identification process, and then converting the feature mapping information in the original community scene network model into a fixed-bit number model fixed-point number, wherein two situations exist at the moment: the method is that the converted fixed-bit number of the model exceeds the number of the expression range of the fixed-bit number, and at the moment, the unified quantization bit number of each network layer number in the original community scene network model is required to be quantized in a regular quantization mode; and the other mode is that the number of the fixed-point number of the converted model does not exceed the expression range of the fixed-point number, each network layer number in the original community scene network model can be quantized in an irregular quantization mode, namely, the maximum quantization fixed-point number met in each layer of network model is determined in an irregular interlayer mode, so that the preprocessed scene network model with smaller storage space is saved, and the original community scene network model is optimized in a quantization mode, so that model parameters of a shallow layer can be frozen in the subsequent fine adjustment process of the network model.
Drawings
FIG. 1 is a flow chart of a method for fine tuning a network model to accommodate community scenarios in accordance with an embodiment of the present application;
FIG. 2 is a flowchart of step S1 in a network model trimming method adapted to a community scenario according to an embodiment of the present application;
FIG. 3 is a flowchart of step S2 in a network model trimming method adapted to a community scenario according to an embodiment of the present application;
FIG. 4 is a flowchart of step S3 in a network model tuning method adapted to a community scenario according to an embodiment of the present application;
FIG. 5 is a flowchart after step S4 in a network model tuning method adapted to a community scenario according to an embodiment of the present application;
FIG. 6 is a schematic block diagram of a network model tuning system adapted to a community scenario in accordance with an embodiment of the present application;
fig. 7 is a schematic view of an apparatus in an embodiment of the present application.
Detailed Description
The present application is described in further detail below with reference to the accompanying drawings.
In an embodiment, as shown in fig. 1, the application discloses a network model fine tuning method adapting to a community scene, which specifically includes the following steps:
s1: and performing model preprocessing on the original community scene network model to obtain a preprocessed scene network model.
In the embodiment, a model fine adjustment control platform is arranged to store and control a community scene network model, and the model fine adjustment control platform is an intelligent interactive terminal provided with a processor with network model training and calculating functions; and performing forward test on the original community scene network model, extracting and identifying feature mapping in the original community scene network model, and performing regular fixed-point quantization on the original community scene network model by a binary-based method.
Specifically, for each model parameter layer feature in the original community scene network model, mapping to a band body in a fixed point value mode, storing the fixed point value in an index mode, and enabling a user to input quantized model precision through a model fine-tuning control platform, for example, setting a precision loss threshold value by placing excessive model precision deviation of the original community scene network model.
Further, the precision loss threshold value is equal to a precision A value minus a precision B value, the precision A value represents the precision of an initial original community scene network model in a full-precision fixed point number representation state, and the precision B value represents the precision of a source community scene network model represented by the fixed point number after quantization; and if the accuracy of the preprocessed scene network model obtained after quantization exceeds the accuracy loss threshold value, the quantized fixed-point number is increased.
S2: and screening model parameters from the corresponding preprocessed scene network model based on the acquired scene fine tuning request to obtain a fine tuning original data set.
In this embodiment, the scene fine adjustment request may be input by the user through the model fine adjustment control platform, or the user may automatically control the model fine adjustment control platform to automatically output the scene fine adjustment request by setting a fixed model fine adjustment period.
Specifically, when a community scene is changed or a newly added community scene exists, determining whether model parameters in a plurality of network layers in a corresponding preprocessed scene network model use original model parameters of a current network layer or need to be migrated to a next network parameter layer for migration and fine adjustment based on the acquired scene fine adjustment request, so as to divide and adjust fine adjustment ranges in the scene network model.
S3: constructing a fine tuning auxiliary model according to the fine tuning original data set and the acquired fine tuning incremental data set; and accessing the fine tuning auxiliary model into the original community scene network model.
In this embodiment, the obtained fine tuning incremental data set may be a set of model design parameters input by the user according to the changed community scene or the newly added community scene, or may be a model design parameter acquired by the community scene image and/or the data acquisition device captured by the monitoring camera in the community. The acquired fine-tuning incremental dataset is a set of model parameters for the community scene that needs fine-tuning.
Specifically, the trimming auxiliary model is provided with trimming parameters, so that an interface for modifying the original community scene network model is added in the original community scene network model, and the trimming parameters are accessed into the original community scene network model.
S4: and inputting the acquired scene information parameters into the original community scene network model and the fine tuning auxiliary model for training.
In this embodiment, the acquired scene information parameters are scene design parameters of a changed or newly added community scene and a changed community scene image acquired by the camera device, and the model fine adjustment control platform can identify and extract image feature information from the community scene image and convert the image feature information in the identification process into model fine adjustment parameters.
S5: when training is performed until the original community scene network model and the fine-tuning auxiliary model are converged, fine-tuning is performed on the original community scene network model based on fine-tuning auxiliary parameters of the fine-tuning auxiliary model so as to obtain a fine-tuned scene network model.
Specifically, the original community scene network model and the fine tuning auxiliary model are trained by inputting the model fine tuning parameters, and when the model converges (namely, the fluctuation unit is in an acceptable magnitude range), the training is stopped, and the fine tuning auxiliary parameters of the fine tuning auxiliary model at the moment are acquired to carry out fine tuning on the original community scene network model.
In this embodiment, the original community scene network model is trimmed based on the scene trimming request sent or automatically acquired by the user, so that the network model is trimmed by a small amount of model trimming parameters and trimming auxiliary parameters based on the trimming auxiliary model, which is beneficial to reducing the trimming training period of the community scene network model, and promotes the application of the community scene network model in the smart community, so that the service of the smart community is more excellent, convenient and digitalized.
In one embodiment, as shown in fig. 2, in step S1, the original community scene network model includes a community scene image; performing model preprocessing on the original community scene network model to obtain a preprocessed scene network model, wherein the method specifically comprises the following steps of: s11: selecting and identifying a community scene image in the original community scene network model, and extracting feature mapping information generated during identification.
In this embodiment, the community scene image is obtained by a camera device arranged in the community, and the model fine adjustment control platform can select a community scene image with higher shooting precision and clearer shooting precision, and extract feature mapping information generated in the calculation process of the selected community scene image.
S12: and converting the feature mapping information into a model fixed point number with a fixed bit number based on the preset image selection precision.
In this embodiment, on the premise of satisfying the image selection precision, the feature map of the original full-precision floating point number is changed to be represented by the fixed-bit number model fixed-point number.
S13: and when the fixed-bit number of the model exceeds the preset fixed-bit number expression range, carrying out unified quantization bit number rule quantization on all network parameter layers in the original community scene network model to obtain a preprocessed scene network model.
In this embodiment, if the number of bits exceeds the fixed-point number expression range, bits exceeding a specified number of bits are truncated in binary, and regular quantization of the unified quantization bits is performed on all the convolutional network layers in the community scene network model.
Or alternatively, the first and second heat exchangers may be,
s14: and when the fixed-bit number of the model does not exceed the preset fixed-bit number expression range, determining the maximum quantization bit number of each network parameter layer in the original community scene network model in an irregular quantization mode to obtain a preprocessed scene network model.
In this embodiment, on the premise that the number of quantization bits determined by the regular quantization is not exceeded, the maximum number of quantization bits satisfied by each layer of convolutional neural network in the community scene network model is determined by the inter-layer irregular quantization, so as to save more storage space.
In one embodiment, as shown in fig. 3, in step S2, model parameters are screened from corresponding preprocessed scene network models based on the acquired scene fine-tuning request to obtain fine-tuned raw data sets, which specifically includes:
s21: and determining a fine tuning scene and a fine tuning range of the scene network model based on the acquired scene fine tuning request.
Specifically, due to the complexity and diversity of community scenes, when a community scene is changed or added, a fine tuning scene and a fine tuning range of a scene network model in which a change is specifically generated need to be determined in a targeted manner in the presence Jing Weidiao.
S22: and screening model parameters from the corresponding preprocessed scene network model according to the fine tuning scene and the fine tuning range of the scene model to obtain a fine tuning original data set.
In this embodiment, the fine tuning of the original data set performs feature extraction on model parameters in the original network model related to the changed community scene in the original data set, so as to determine to perform model parameter freezing or model parameter migration fine tuning based on the acquired scene information parameters: for example, model parameters of shallow layers such as building shapes, community areas, road planning and the like of community buildings in some community scenes which are not changed are directly frozen, and model parameters such as regional shapes in the community scenes which are directly related to the changes, living appliances in the scenes and the like are migrated and finely adjusted, so that iterative fine adjustment optimization can be carried out on the model parameters in the original scene network model in a targeted manner, the model training period which is required to be spent when the network model of the community scenes is shortened is greatly shortened, and the fine adjustment efficiency of the network model is improved.
In one embodiment, as shown in fig. 4, in step S3, a fine-tuning auxiliary model is constructed according to the fine-tuning original dataset and the acquired fine-tuning incremental dataset; and accessing the fine tuning auxiliary model into an original community scene network model, wherein the fine tuning auxiliary model comprises an encoder and a decoder, and specifically comprises the following steps:
s31: the encoder is used for extracting scene characteristic information in the fine adjustment original data set and the fine adjustment incremental data set; the decoder is used for restoring the target scene information from the scene characteristic information.
S32: and adding the scene characteristic information of the encoder of the fine tuning auxiliary model to the corresponding model position in the original community scene network model according to the acquired scene fine tuning request.
S33: and adding the target scene information of the decoder of the fine tuning auxiliary model to the corresponding model position in the original community scene network model according to the acquired scene fine tuning request.
In this embodiment, the user may construct the incremental dataset manually by a human or automatically by the data acquisition module; the encoder is used for extracting scene characteristic information in the fine adjustment original data set and the fine adjustment incremental data set and adding the scene characteristic information to corresponding model positions in the original community scene network model; the decoder is used for restoring the scene characteristic information in the scene model range to be trimmed according to the acquired scene trimming request to obtain target scene information and adding the target scene information to the corresponding model position in the original community scene network model, so that the model trimming result in the original community scene network model is changed, and the distribution adjustment of the trimming auxiliary model to the trimming result of the original community scene network model is realized.
In one embodiment, as shown in fig. 5, after step S4, the network model fine-tuning method adapted to the community scenario further includes:
s41: the preset learning rate fine tuning algorithm determines the learning rate range of the ith iteration period, wherein i is not less than 1.
S42: and adjusting the learning rate of the original community scene network model in different iteration periods and/or different model layers according to a preset learning rate fine adjustment algorithm.
In this embodiment, the learning rate range of the ith iteration cycle is constructed according to a preset cosine functionThe preset learning rate fine adjustment algorithm comprises the following steps: the preset learning rate fine tuning algorithm comprises the following steps:
in particular, the method comprises the steps of,and->For the learning rate range of the ith iteration period, T cr Is the iteration step number of the current iteration period, and T i Representing the current iteration period, alpha and beta represent coordination factors of learning rates of different model layers, layer m Representing the relative position of the mth layer of the network model, layer all Representing the total number of layers of the network model.
In the embodiment, inputting the fine tuning incremental data set into an original community scene network model for training, and outputting a model fine tuning result, namely a corresponding model training state node, according to a preset learning rate fine tuning algorithm; therefore, the method and the device realize quick iterative training based on the community scene based on the complexity and diversity of the community scene, and can effectively learn model data and model parameter characteristics of the changed or newly-added community scene under the condition of keeping accuracy, so that the model fine tuning efficiency of the community scene model is improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
In an embodiment, a network model fine tuning system adapted to a community scene is provided, where the network model fine tuning system adapted to the community scene corresponds to the network model fine tuning method adapted to the community scene in the foregoing embodiment.
As shown in FIG. 6, a network model fine tuning system adapting to a community scene comprises a preprocessing module, a screening parameter module, a construction access module and a training fine tuning module. The detailed description of each functional module is as follows:
the preprocessing module is used for carrying out model preprocessing on the original community scene network model to obtain a preprocessed scene network model; the screening parameter module is used for screening model parameters from the corresponding preprocessed scene network model based on the acquired scene fine adjustment request to obtain a fine adjustment original data set;
the access module is used for constructing a fine adjustment auxiliary model according to the fine adjustment original data set and the acquired fine adjustment incremental data set; the fine tuning auxiliary model is connected to the original community scene network model;
The training fine tuning module is used for inputting the acquired scene information parameters into the original community scene network model and the fine tuning auxiliary model for training; when training is performed until the original community scene network model and the fine-tuning auxiliary model are converged, fine-tuning is performed on the original community scene network model based on fine-tuning auxiliary parameters of the fine-tuning auxiliary model so as to obtain a fine-tuned scene network model.
Optionally, the preprocessing module includes:
the image information extraction sub-module is used for selecting and identifying the community scene image in the original community scene network model and extracting feature mapping information generated during identification;
the information conversion sub-module is used for converting the feature mapping information into fixed-bit number model fixed-point numbers based on preset image selection precision;
the rule quantization sub-module is used for carrying out rule quantization of unified quantization bits on all network parameter layers in the original community scene network model when the fixed-bit number of the model exceeds a preset fixed-bit number expression range so as to obtain a preprocessed scene network model;
and the irregular quantization sub-module is used for determining the maximum quantization bit number of each network parameter layer in the original community scene network model in an irregular quantization mode to obtain a preprocessed scene network model when the model fixed point number of the fixed bit number does not exceed the preset fixed point number expression range.
Optionally, the screening parameter module includes:
the scene range determination submodule is used for determining a fine tuning scene and a fine tuning range of the scene network model based on the acquired scene fine tuning request;
and the screening sub-module is used for screening model parameters from the corresponding preprocessed scene network model according to the fine tuning scene and the fine tuning range of the scene model so as to obtain a fine tuning original data set.
For specific limitations of the network model tuning system adapted to the community scene, reference may be made to the above limitation of the network model tuning method adapted to the community scene, and details thereof will not be repeated herein; all or part of the modules in the network model fine-tuning system adapting to the community scene can be realized by software, hardware and the combination thereof; the above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing an original community scene network model, a fine-tuning original data set, a fine-tuning incremental data set and a fine-tuning scene network model. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a network model tuning method that adapts to community scenarios.
In one embodiment, a computer device is provided comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the following steps when executing the computer program: performing model preprocessing on the original community scene network model to obtain a preprocessed scene network model,
screening model parameters from the corresponding preprocessed scene network model based on the acquired scene fine tuning request to obtain a fine tuning original data set;
constructing a fine tuning auxiliary model according to the fine tuning original data set and the acquired fine tuning incremental data set; the fine tuning auxiliary model is connected to the original community scene network model;
inputting the acquired scene information parameters into an original community scene network model and a fine tuning auxiliary model for training;
when training is performed until the original community scene network model and the fine-tuning auxiliary model are converged, fine-tuning is performed on the original community scene network model based on fine-tuning auxiliary parameters of the fine-tuning auxiliary model so as to obtain a fine-tuned scene network model.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
Performing model preprocessing on the original community scene network model to obtain a preprocessed scene network model,
screening model parameters from the corresponding preprocessed scene network model based on the acquired scene fine tuning request to obtain a fine tuning original data set;
constructing a fine tuning auxiliary model according to the fine tuning original data set and the acquired fine tuning incremental data set; the fine tuning auxiliary model is connected to the original community scene network model;
inputting the acquired scene information parameters into an original community scene network model and a fine tuning auxiliary model for training;
when training is performed until the original community scene network model and the fine-tuning auxiliary model are converged, fine-tuning is performed on the original community scene network model based on fine-tuning auxiliary parameters of the fine-tuning auxiliary model so as to obtain a fine-tuned scene network model.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand; the technical scheme described in the foregoing embodiments can be modified or some of the features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A network model fine tuning method adapting to community scenes is characterized by comprising the following steps:
performing model preprocessing on the original community scene network model to obtain a preprocessed scene network model;
Screening model parameters from the corresponding preprocessed scene network model based on the acquired scene fine tuning request to obtain a fine tuning original data set;
constructing a fine tuning auxiliary model according to the fine tuning original data set and the acquired fine tuning incremental data set; accessing the fine tuning auxiliary model into the original community scene network model;
inputting the acquired scene information parameters into the original community scene network model and the fine tuning auxiliary model for training;
and when training is performed until the original community scene network model and the fine tuning auxiliary model are converged, fine tuning is performed on the original community scene network model based on fine tuning auxiliary parameters of the fine tuning auxiliary model so as to obtain a fine-tuned scene network model.
2. The network model fine tuning method for adapting to a community scene according to claim 1, wherein the original community scene network model comprises a community scene image; the method for preprocessing the model of the original community scene network model to obtain a preprocessed scene network model specifically comprises the following steps:
selecting and identifying a community scene image in an original community scene network model, and extracting feature mapping information generated during identification;
Converting the feature mapping information into a model fixed point number with fixed digits based on preset image selection precision;
when the fixed number of the fixed-bit model exceeds a preset fixed number expression range, carrying out unified quantization bit rule quantization on all network parameter layers in the original community scene network model to obtain a preprocessed scene network model;
or alternatively, the first and second heat exchangers may be,
and when the fixed-bit number of the model fixed-bit number does not exceed the preset fixed-bit number expression range, determining the maximum quantization bit number of each network parameter layer in the original community scene network model in an irregular quantization mode to obtain a preprocessed scene network model.
3. The network model tuning method for adapting to a community scene according to claim 1, wherein S2 screens model parameters from the corresponding preprocessed scene network model based on the acquired scene tuning request to obtain a tuning original data set, specifically comprising:
determining a fine tuning scene and a fine tuning range of the scene network model based on the acquired scene fine tuning request;
and screening model parameters from the corresponding preprocessed scene network model according to the fine tuning scene and the fine tuning range of the scene model to obtain a fine tuning original data set.
4. The network model fine tuning method adapted to a community scene according to claim 1, wherein the fine tuning auxiliary model is constructed according to the fine tuning original dataset and the acquired fine tuning incremental dataset; and accessing the fine tuning auxiliary model into the original community scene network model, wherein the fine tuning auxiliary model comprises an encoder and a decoder, and specifically comprises the following steps:
the encoder is used for extracting scene characteristic information in the fine adjustment original data set and the fine adjustment incremental data set; the decoder is used for restoring target scene information from the scene characteristic information;
adding scene characteristic information of an encoder of the fine tuning auxiliary model to a corresponding model position in the original community scene network model according to the acquired scene fine tuning request;
and adding the target scene information of the decoder of the fine tuning auxiliary model to the corresponding model position in the original community scene network model according to the acquired scene fine tuning request.
5. The method for fine tuning a network model adapted to a community scene according to claim 1, wherein after inputting the acquired scene information parameters into the original community scene network model and the fine tuning auxiliary model for training, the method comprises:
A preset learning rate fine tuning algorithm determines a learning rate range of an ith iteration period, wherein i is not less than 1;
and adjusting the learning rate of the original community scene network model in different iteration periods and/or different model layers according to the preset learning rate fine adjustment algorithm.
6. A network model fine-tuning system adapted to a community scenario, comprising:
the preprocessing module is used for carrying out model preprocessing on the original community scene network model to obtain a preprocessed scene network model;
the screening parameter module is used for screening model parameters from the corresponding preprocessed scene network model based on the acquired scene fine adjustment request so as to obtain a fine adjustment original data set;
the access module is used for constructing a fine-tuning auxiliary model according to the fine-tuning original data set and the acquired fine-tuning incremental data set; accessing the fine tuning auxiliary model into the original community scene network model;
the training fine tuning module is used for inputting the acquired scene information parameters into the original community scene network model and the fine tuning auxiliary model for training; and when training is performed until the original community scene network model and the fine tuning auxiliary model are converged, fine tuning is performed on the original community scene network model based on fine tuning auxiliary parameters of the fine tuning auxiliary model so as to obtain a fine-tuned scene network model.
7. The network model tuning system for adapting to a community scenario of claim 6, wherein the preprocessing module comprises:
the image information extraction sub-module is used for selecting and identifying the community scene image in the original community scene network model and extracting feature mapping information generated during identification;
the information conversion sub-module is used for converting the feature mapping information into a model fixed point number with a fixed bit number based on a preset image selection precision;
the rule quantization sub-module is used for carrying out rule quantization of unified quantization bits on all network parameter layers in the original community scene network model to obtain a preprocessed scene network model when the fixed-bit number of the model exceeds a preset fixed-bit number expression range;
and the irregular quantization sub-module is used for determining the maximum quantization digit of each network parameter layer in the original community scene network model in an irregular quantization mode to obtain a preprocessed scene network model when the fixed-digit model fixed-point number does not exceed a preset fixed-point number expression range.
8. The network model tuning system for adapting to a community scenario of claim 6, wherein the filtering parameter module comprises:
The scene range determination submodule is used for determining a fine tuning scene and a fine tuning range of the scene network model based on the acquired scene fine tuning request;
and the screening sub-module is used for screening model parameters from the corresponding preprocessed scene network model according to the fine tuning scene and the fine tuning range of the scene model so as to obtain a fine tuning original data set.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the network model tuning method for adapting to community scenarios according to any one of claims 1 to 5 when the computer program is executed.
10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the steps of the network model tuning method for adapting to community scenarios according to any one of claims 1 to 5.
CN202311214817.4A 2023-09-19 2023-09-19 Network model fine-tuning method, system and equipment suitable for community scene Pending CN117273165A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311214817.4A CN117273165A (en) 2023-09-19 2023-09-19 Network model fine-tuning method, system and equipment suitable for community scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311214817.4A CN117273165A (en) 2023-09-19 2023-09-19 Network model fine-tuning method, system and equipment suitable for community scene

Publications (1)

Publication Number Publication Date
CN117273165A true CN117273165A (en) 2023-12-22

Family

ID=89203818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311214817.4A Pending CN117273165A (en) 2023-09-19 2023-09-19 Network model fine-tuning method, system and equipment suitable for community scene

Country Status (1)

Country Link
CN (1) CN117273165A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117632381A (en) * 2024-01-26 2024-03-01 杭州实在智能科技有限公司 Large model training deployment method and system combining fine tuning technology and distributed scheduling

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117632381A (en) * 2024-01-26 2024-03-01 杭州实在智能科技有限公司 Large model training deployment method and system combining fine tuning technology and distributed scheduling
CN117632381B (en) * 2024-01-26 2024-05-24 杭州实在智能科技有限公司 Large model training deployment method and system combining fine tuning technology and distributed scheduling

Similar Documents

Publication Publication Date Title
WO2021129086A1 (en) Traffic prediction method, device, and storage medium
CN106845640A (en) It is heterogeneous in layer based on depth convolutional neural networks to pinpoint quantization method at equal intervals
CN117273165A (en) Network model fine-tuning method, system and equipment suitable for community scene
CN106897734A (en) K average clusters fixed point quantization method heterogeneous in layer based on depth convolutional neural networks
CA3038018C (en) Performing cache update adaptation
CN111881737B (en) Training method and device of age prediction model, and age prediction method and device
CN110674924B (en) Deep learning inference automatic quantification method and device
CN111177217A (en) Data preprocessing method and device, computer equipment and storage medium
CN110796485A (en) Method and device for improving prediction precision of prediction model
CN110955405B (en) Input data processing and index value acquisition method and device and electronic equipment
CN111598457A (en) Method and device for determining quality of power wireless network
CN113343020B (en) Image processing method and device based on artificial intelligence and electronic equipment
CN113256184B (en) Resource planning method for measurement and control data transmission resource integration satellite ground station
CN112527749B (en) Cache policy determination method and device, computer equipment and readable storage medium
CN114338416B (en) Space-time multi-index prediction method and device and storage medium
CN116502210A (en) Account authority distribution method, device and equipment and readable storage medium
CN115829123A (en) Natural gas demand prediction method and device based on grey model and neural network
CN115374278A (en) Text processing model distillation method, device, computer equipment and medium
CN114969023A (en) Database learning type index construction method and system
CN112396100A (en) Fine-grained classification model optimization method, system and related device
CN113011555B (en) Data processing method, device, equipment and storage medium
CN112651411B (en) Gradient quantization method and system for distributed deep learning
CN114757440A (en) Distributed wind power prediction method, model training method, device and medium
CN117763347A (en) Method, device, equipment and storage medium for identifying financial document
CN117172366A (en) Optical power prediction method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination