A ConvGRU neural network circuit and training method for color image recognition
By introducing convolutional neural network module and fully connected layer circuit module into the GRU hardware circuit, the problem that existing GRU hardware circuits cannot effectively extract feature in image processing is solved, high-accuracy color image recognition is achieved, and the problem of excessive hardware space occupation is avoided.
Patent Information
- Application Number
- CN202111367056.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-18
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2041-11-18
AI Technical Summary
The existing GRU hardware circuits cannot effectively extract image features in the field of image processing, resulting in low accuracy in image recognition.
A ConvGRU neural network circuit is proposed. By introducing a convolutional neural network module and a fully connected layer circuit module into the GRU hardware circuit, replacing the traditional fully connected layer, strengthening the feature extraction capability of circuit input.
It greatly improves the accuracy of GRU circuits in image recognition, can reach the recognition level of software 18-layer convolutional neural network, and avoids the problem of excessive hardware space occupied by hardware 18-layer convolutional neural network.
Smart Images

Figure CN114021712B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of neural network circuits, and in particular to a ConvGRU neural network circuit and a training method for realizing color image recognition. Background Art
[0002] With the development of deep neural networks, such as convolutional neural networks (CNN), fully convolutional neural networks (FCN), long short-term memory (LSTM), gated recurrent units (GRU), etc., the research on deep neural network hardware design has been promoted. In the process of using hardware to build deep neural networks, problems such as large input data volume and complex network structure have always been difficult problems that researchers cannot avoid, and the only way to solve these problems is to increase the hardware area of the circuit.
[0003] With the development of hardware neural network circuits, various basic neural network circuits have been implemented in hardware. However, the existing basic neural network structures basically have some shortcomings and are not suitable for practical applications. Therefore, how to improve the basic neural network structure has become the biggest problem hindering the practical application of hardware neural networks.
[0004] Memristor is a nanoscale device with the advantages of high volatility, high density, low power consumption, and compatibility with CMOS devices. It is highly suitable for hardware neural networks. Therefore, hardware neural networks based on memristors have attracted extensive attention from researchers. Figure 1 As shown in the figure, a single GRUCell circuit module based on the threshold memristor of AIST in the prior art is shown. For the output function softmax of the fully connected layer connected to the GRU network, due to the exponential operation, if an op amp is used to build it, a larger power supply voltage must be provided, which does not meet the original intention of energy saving and high efficiency of this neural network circuit design. The softmax function mainly performs the normalization of M outputs and compares the size operations, so a competitive neural network circuit (winner take all circuit) with a higher degree of integration can be used. Figure 1 The AIST-based threshold memristor is used in this neural network circuit. This unit is integrated in a vertical line, which improves the integration level. At the same time, due to the characteristics of the conductivity adjustment circuit, there will be no mutual interference between the conductivity information.
[0005] Although the existing GRU has hardware implementation solutions, it lacks effective hardware neural network algorithms and is difficult to complete actual projects. Especially in the field of image processing, how to effectively extract features from images has always been a difficult problem that plagues the design of deep neural network hardware.
[0006] In view of this, the present invention is proposed. Summary of the invention
[0007] The purpose of the present invention is to provide a ConvGRU neural network circuit and training method for realizing color image recognition, so as to solve the above-mentioned technical problems existing in the prior art. The present invention improves the deficiencies existing in the existing GRU hardware circuit in image processing, solves the problem that the existing GRU hardware circuit cannot effectively extract features from images, greatly improves the accuracy of the GRU circuit in image recognition, and can reach the level of an 18-layer convolutional neural network with a software 3-layer convolutional neural network and a 1-layer hardware GRUCell circuit module, and avoids the problem that the hardware 18-layer convolutional neural network occupies too much hardware space, and has extremely high practicality.
[0008] The objective of the present invention is achieved through the following technical solutions:
[0009] A ConvGRU neural network circuit for realizing color image recognition includes a convolutional neural network module, a GRUCell circuit module and a fully connected layer circuit module; the output of the convolutional neural network module is connected to the input of the GRUCell circuit module, and the output of the GRUCell circuit module is connected to the fully connected layer circuit module.
[0010] Preferably, the convolutional neural network module includes a convolution calculation unit and a convolution acceleration circuit; the output of the convolution calculation unit is input into the convolution acceleration circuit in the form of a pulse signal, and then output by the convolution acceleration circuit to the GRUCell circuit module.
[0011] Preferably, the convolution calculation unit adopts a 3-layer convolutional neural network, and the convolution acceleration circuit adopts a 1T1R array.
[0012] Preferably, the convolutional neural network module adopts an FPGA-based convolutional neural network accelerator.
[0013] Preferably, the GRUCell circuit module adopts a single-layer unidirectional GRUCell circuit module.
[0014] The training method of the ConvGRU neural network circuit for realizing color image recognition comprises the following steps:
[0015] Step 1, software preprocessing: use software to matrix the training color image and convert it into a training image pulse signal for input into the ConvGRU neural network circuit in a Gaussian coding manner;
[0016] Step 2: input the training image pulse signal obtained in step 1 into the convolutional neural network module in the ConvGRU neural network circuit for feature extraction, and then input the feature matrix pulse signal output by the convolutional neural network module into the GRUCell circuit module in the ConvGRU neural network circuit for training, and then update the weight of the GRUCell circuit module and the weight of the fully connected layer circuit module according to the training completion pulse signal output by the GRUCell circuit module;
[0017] Step 3, repeat the above steps 1 and 2 to process the training color images in the training data set one by one, the GRUCell circuit module completes 7 trainings as a batch, all the training color images in the training data set complete one training as an epoch, run 20 epochs, and retain the weight of the GRUCell circuit module and the weight of the fully connected layer circuit module after the last training is completed, that is, the ConvGRU neural network circuit training is completed.
[0018] Preferably, the convolutional neural network module includes a convolutional computing unit and a convolutional acceleration circuit; the training image pulse signal enters the convolution layer of the convolutional computing unit, enters the pooling layer through the convolution kernel scanning for dimension reduction and feature extraction, and then outputs the feature matrix to the convolution acceleration circuit in the form of a pulse signal, and then the convolution acceleration circuit outputs the feature matrix pulse signal, which is the feature matrix pulse signal output by the convolutional neural network module.
[0019] The method for using the above-mentioned ConvGRU neural network circuit for realizing color image recognition includes: the ConvGRU neural network circuit for realizing color image recognition has ten output ports, and the ten output ports respectively represent 10 different image types; firstly, the color image to be detected is preprocessed by software, and then the image information after software preprocessing is input into the trained ConvGRU neural network circuit for realizing color image recognition for processing. The output port that outputs the strongest pulse signal proves that the output port is valid, and the color image classification result is obtained.
[0020] A ConvGRU neural network circuit system for realizing color image recognition adopts the above-mentioned ConvGRU neural network circuit for realizing color image recognition and is trained according to the above-mentioned training method of the ConvGRU neural network circuit for realizing color image recognition.
[0021] Compared with the prior art, the ConvGRU neural network circuit for realizing color image recognition provided by the present invention replaces the fully connected layer used as input in the existing GRU hardware neural network with a convolutional neural network module, and updates the weights of the GRUCell circuit module and the weights of the fully connected layer circuit module according to the training completion pulse signal output by the GRUCell circuit module, thereby strengthening the feature extraction of the circuit input, so that it can accurately and efficiently extract features from complex images and achieve the purpose of color image recognition. This solves the problem that the existing GRU hardware circuit cannot effectively extract features from images, greatly improves the accuracy of the GRU circuit in image recognition, and can reach the level of an 18-layer convolutional neural network with a software 3-layer convolutional neural network and a 1-layer hardware GRUCell circuit module, and avoids the problem that the hardware 18-layer convolutional neural network occupies too much hardware space, and has extremely high practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0023] Figure 1 Schematic diagram of a single GRUCell circuit module of a threshold-type memristor based on AIST in the prior art.
[0024] Figure 2 Schematic diagram of the architecture of the ConvGRU neural network circuit for implementing color image recognition in an embodiment of the present invention.
[0025] Figure 3 This is a schematic diagram comparing the accuracy of GRU and LSTM obtained when the ConvGRU neural network circuit for color image recognition provided in Example 1 of the present invention is used for color image recognition classification.
[0026] Figure 4 This is a schematic diagram of a confusion matrix obtained when the ConvGRU neural network circuit for color image recognition provided in Example 1 of the present invention is used for color image recognition classification. DETAILED DESCRIPTION
[0027] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention; it is obvious that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments, which does not constitute a limitation of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of the present invention.
[0028] First, the terms that may be used in this article are explained as follows:
[0029] The terms "include", "comprises", "contains", "has" or other descriptions with similar semantics should be interpreted as non-exclusive inclusion. For example, including certain technical feature elements (such as raw materials, components, ingredients, carriers, dosage forms, materials, dimensions, parts, components, mechanisms, devices, steps, procedures, methods, reaction conditions, processing conditions, parameters, algorithms, signals, data, products or products, etc.) should be interpreted as including not only certain technical feature elements explicitly listed, but also other technical feature elements known in the art that are not explicitly listed.
[0030] The ConvGRU neural network circuit and training method for realizing color image recognition provided by the present invention are described in detail below. The contents not described in detail in the present invention belong to the prior art known to professionals in the field. If the specific conditions are not specified in the embodiments of the present invention, they are carried out according to the conventional conditions in the field or the conditions recommended by the manufacturer. If the manufacturer is not specified in the reagents or instruments used in the embodiments of the present invention, they are all conventional products that can be purchased commercially.
[0031] like Figure 2 As shown, the present invention provides a ConvGRU neural network circuit for realizing color image recognition, and its structure includes a convolutional neural network module, a GRUCell circuit module and a fully connected layer circuit module; the output of the convolutional neural network module is connected to the input of the GRUCell circuit module, and the output of the GRUCell circuit module is connected to the fully connected layer circuit module.
[0032] Specifically, the ConvGRU neural network circuit for realizing color image recognition may include the following implementation schemes:
[0033] (1) The inventors of the present invention have found that if the convolutional neural network module completely uses hardware to implement the convolutional neural network, the convolutional neural network will interfere with the GRUCell circuit module. Therefore, it is best not to completely use hardware to implement the convolutional neural network for the convolutional neural network module. A convolutional neural network implemented by software or a convolutional neural network implemented by a hardware-software integration solution can be used. When training the ConvGRU neural network circuit for color image recognition, since the scale of training data is relatively large and the GRUCell circuit module weights need to be updated according to the training data, in order to speed up the training, the convolutional neural network module is preferably implemented by a hardware-software integration solution. When the trained ConvGRU neural network circuit for color image recognition is used for color image recognition, since there is no need to update the GRUCell circuit module weights, the convolutional neural network module can use a convolutional neural network implemented by software.
[0034] (2) When the convolutional neural network module uses a hardware-software integrated solution to implement the convolutional neural network, the convolutional neural network module may include a convolutional calculation unit and a convolutional acceleration circuit; the output of the convolutional calculation unit is input into the convolutional acceleration circuit in the form of a pulse signal, and then output to the GRUCell circuit module by the convolutional acceleration circuit; the convolutional calculation unit may use a 3-layer convolutional neural network, and the convolutional acceleration circuit may use a 1T1R array. The convolutional calculation unit uses software running on a hardware platform to implement the convolutional neural network, and is used in conjunction with a hardware-implemented convolutional acceleration circuit (the convolutional acceleration circuit may use a 1T1R array). This can not only effectively avoid the interference of the hardware-implemented convolutional neural network on the GRUCell circuit module, but also improve the training speed, save hardware space, and reduce costs; for example: the convolutional neural network module is preferably an FPGA-based convolutional neural network accelerator.
[0035] (3) The GRUCell circuit module adopts a single-layer unidirectional GRUCell circuit module. For example, the GRUCell circuit module can adopt Figure 1 The single-layer unidirectional GRUCell circuit module shown is composed of a single GRUCell circuit module of a threshold-type memristor based on AIST in the prior art.
[0036] Furthermore, the present invention provides a training method for the ConvGRU neural network circuit for realizing color image recognition, which may include the following steps:
[0037] Step 1, software preprocessing: Use software to matrix the training color image and convert it into a training image pulse signal for input into the ConvGRU neural network circuit in a Gaussian coding manner.
[0038] Step 2: Input the training image pulse signal obtained in step 1 into the convolutional neural network module in the ConvGRU neural network circuit for feature extraction, and then input the feature matrix pulse signal output by the convolutional neural network module into the GRUCell circuit module in the ConvGRU neural network circuit for training, and then update the weight of the GRUCell circuit module and the weight of the fully connected layer circuit module according to the training completion pulse signal output by the GRUCell circuit module.
[0039] Step 3, repeat the above steps 1 and 2 to process the training color images in the training data set one by one, the GRUCell circuit module completes 7 trainings as a batch, all the training color images in the training data set complete one training as an epoch, run 20 epochs, and retain the weight of the GRUCell circuit module and the weight of the fully connected layer circuit module after the last training is completed, that is, the ConvGRU neural network circuit training for realizing color image recognition is completed.
[0040] Among them, the convolutional neural network module may include a convolution calculation unit and a convolution acceleration circuit; the training image pulse signal first enters the convolution layer of the convolution calculation unit, and is scanned by the convolution kernel (the convolution kernel scale can be 4*4) into the pooling layer (Maxpool) for dimensionality reduction and feature extraction, and then outputs the feature matrix to the convolution acceleration circuit in the form of a pulse signal, and then the convolution acceleration circuit outputs the feature matrix pulse signal, which is the feature matrix pulse signal output by the convolutional neural network module.
[0041] Furthermore, the present invention also provides a method for using the above-mentioned ConvGRU neural network circuit for realizing color image recognition, including: the ConvGRU neural network circuit for realizing color image recognition has ten output ports, and the ten output ports respectively represent 10 different picture types; firstly, the color image to be detected is subjected to software preprocessing (the software preprocessing process is basically the same as the software preprocessing process of step 1 in the above-mentioned training method, except that the color image to be detected is processed instead of the training color image), and then the image information after software preprocessing is input into the trained ConvGRU neural network circuit for realizing color image recognition for processing. The output port that outputs the strongest pulse signal proves that the output port is valid, and the color image classification result is obtained.
[0042] Compared with the prior art, the ConvGRU neural network circuit and training method for realizing color image recognition provided by the present invention have at least the following advantages:
[0043] (1) Some GRU hardware neural networks in the prior art will set a fully connected layer before GRUCell, and the information to be processed is first input into the fully connected layer and then into GRUCell. The present invention improves the circuit structure of the existing GRU hardware neural network. The main improvement is to replace the input fully connected layer with a convolutional layer, which strengthens the feature extraction of the circuit input, so that it can accurately and efficiently extract features from complex images, thereby achieving the purpose of color image recognition.
[0044] (2) In terms of algorithms, the present invention designs a set of supporting software algorithms for the improved circuit of the present invention, which together with the improved circuit of the present invention constitute a feasible and effective ConvGRU neural network processing scheme from input to output. The steps of this scheme are mainly to preprocess the color image by software first, and then output the preprocessed image information to the convolution layer of the convolution neural network module in the form of a pulse signal. The convolution layer processes the input image information, extracts the features therein and converts them into vector form, and then inputs pulse signals of different intensities into the GRUCell circuit module, which is trained by the hardware GRUCell circuit module, and then updates the weight of the GRUCell circuit module and the weight of the fully connected layer circuit module according to the training completion pulse signal output by the GRUCell circuit module. After running 20 epochs, the training process of the entire circuit is completed. In the ConvGRU neural network circuit for color image recognition provided by the embodiment of the present invention, when the convolution calculation unit of the convolution neural network module adopts FPGA-based software to implement a 3-layer convolution neural network, the convolution acceleration circuit of the convolution neural network module adopts a 1T1R array, and the GRUCell circuit module adopts a single-layer unidirectional GRUCell circuit module, the trained ConvGRU neural network circuit for color image recognition is used for color image recognition (taking CIFAR-10 as an example). The test results show that the recognition accuracy of the embodiment of the present invention is as high as 93.7%, which reaches the image recognition level of a software 18-layer convolution neural network. That is to say, the embodiment of the present invention achieves the image recognition effect of a software 18-layer convolution neural network with a software 3-layer convolution neural network and a 1-layer hardware GRUCell. This shows that the embodiment of the present invention can achieve the accuracy of a large space algorithm with a smaller space and has extremely high practicability.
[0045] In summary, it can be seen that the present invention aims to solve the practical application difficulties of GRU hardware neural network, improves the shortcomings of existing GRU hardware circuits in image processing, solves the problem that existing GRU hardware circuits cannot effectively extract features of images, and enables the GRU circuit to show higher accuracy in color image recognition. The level of 18-layer convolutional neural network can be achieved with a software 3-layer convolutional neural network and a 1-layer hardware GRUCell circuit module, and avoids the problem that the hardware 18-layer convolutional neural network occupies too much hardware space, and has extremely high practicability.
[0046] In order to more clearly demonstrate the technical solution and technical effects provided by the present invention, the ConvGRU neural network circuit and training method for realizing color image recognition provided by the embodiments of the present invention are described in detail with specific embodiments below.
[0047] Example 1
[0048] like Figure 2 As shown, a ConvGRU neural network circuit for realizing color image recognition, whose structure includes a convolutional neural network module, a GRUCell circuit module and a fully connected layer circuit module; the output of the convolutional neural network module is connected to the input of the GRUCell circuit module, and the output of the GRUCell circuit module is connected to the fully connected layer circuit module.
[0049] The GRUCell circuit module adopts Figure 1 The single-layer unidirectional GRUCell circuit module shown is composed of a single GRUCell circuit module of a threshold-type memristor based on AIST in the prior art.
[0050] Specifically, when training the ConvGRU neural network circuit for color image recognition provided in Example 1 of the present invention, the convolutional neural network module adopts an FPGA-based convolutional neural network accelerator, which includes a convolutional calculation unit and a convolutional acceleration circuit. The convolutional calculation unit uses FPGA-based software to implement a 3-layer convolutional neural network, and the convolutional acceleration circuit uses a 1T1R array circuit. The ConvGRU neural network circuit for color image recognition provided in Example 1 of the present invention is used to perform color image recognition and classification on the CIFAR-10 data set, and its training method includes the following steps:
[0051] Step A, software preprocessing: Use software to matrix the training color image (taking 32*32 pixels as an example), and convert it into a training image pulse signal for input into the ConvGRU neural network circuit in a Gaussian coding manner (that is, the image information is represented by the pulse signal after Gaussian coding).
[0052] Step B, input the training image pulse signal obtained in step A into the convolutional neural network module in the ConvGRU neural network circuit for feature extraction (that is, the training image pulse signal first enters the convolution layer of the convolution calculation unit, the convolution kernel scale adopts 4*4, and enters the pooling layer (Maxpool) through the convolution kernel scanning for dimension reduction and feature extraction, and then outputs the feature matrix to the convolution acceleration circuit in the form of a pulse signal, and then the convolution acceleration circuit outputs the feature matrix pulse signal, which is the feature matrix pulse signal output by the convolutional neural network module), and then inputs the feature matrix pulse signal output by the convolutional neural network module into the GRUCell circuit module in the ConvGRU neural network circuit for training, and then updates the weight of the GRUCell circuit module and the weight of the fully connected layer circuit module according to the training completion pulse signal output by the GRUCell circuit module.
[0053] Step C, repeat the above steps A and B to process the training color images in the training data set one by one, the GRUCell circuit module completes 7 trainings as a batch, all the training color images in the training data set complete one training as an epoch, run 20 epochs, and retain the weight of the GRUCell circuit module and the weight of the fully connected layer circuit module after the last training is completed, that is, the ConvGRU neural network circuit training for realizing color image recognition is completed.
[0054] Further, when the ConvGRU neural network circuit for realizing color image recognition provided by the trained embodiment 1 of the present invention is used for color image recognition, the convolutional neural network module can replace the convolutional neural network accelerator based on FPGA during training with a convolutional neural network implemented by pure software. Taking the color image recognition and classification of the CIFAR-10 data set as an example, the ConvGRU neural network circuit for realizing color image recognition provided by the trained embodiment 1 of the present invention is tested, and the color image to be detected is first pre-processed by software (the software pre-processing process is basically the same as the software pre-processing process of step A in the above-mentioned training method, except that the color image to be detected is not the training color image), and then the image information after software pre-processing is input into the trained ConvGRU neural network circuit for realizing color image recognition for processing, and the ConvGRU neural network circuit for realizing color image recognition has ten output ports, and these ten output ports represent 10 different picture types respectively. The output port outputting a strong pulse voltage proves that the output port is valid, and each color image to be detected is input with an output port representing the corresponding picture type as valid, so that the color image classification result can be obtained. 2000 images were randomly selected from the CIFAR-10 data set as color images to be detected for the above test. The results showed that the color image recognition accuracy of the ConvGRU neural network circuit for color image recognition provided by Example 1 of the present invention after training was as high as 93.7%. At the same time, the following can be obtained: Figure 3 The accuracy comparison diagram of GRU and LSTM shown in Figure 4 The confusion matrix shown (where Figure 4 A is the confusion matrix 1 of the GRUCell circuit module, Figure 4 B is the confusion matrix 2 of the GRUCell circuit module, Figure 4 C is the confusion matrix of the fully connected layer circuit module), which shows that the ConvGRU neural network circuit for color image recognition provided by Example 1 of the present invention has achieved the image recognition accuracy of an 18-layer convolutional neural network. That is to say, Example 1 of the present invention achieves an image recognition effect similar to that of an 18-layer convolutional neural network with a software 3-layer convolutional neural network and a 1-layer hardware GRUCell, but the volume occupied by the circuit of the 18-layer convolutional neural network is much larger than that of Example 1 of the present invention, that is, Example 1 of the present invention effectively avoids the problem of excessive hardware space occupied by the hardware 18-layer convolutional neural network. This shows that Example 1 of the present invention can achieve the accuracy of a large space algorithm with a smaller space and has extremely high practicability. At present, no hardware solution similar to this ConvGRU algorithm has been disclosed, which provides help for the future implementation of hardware neural networks.
[0055] In summary, it can be seen that the embodiments of the present invention improve the deficiencies of the existing GRU hardware circuit in image processing, solve the problem that the existing GRU hardware circuit cannot effectively extract features of images, greatly improve the accuracy of the GRU circuit in image recognition, and can reach the level of an 18-layer convolutional neural network with a software 3-layer convolutional neural network and a 1-layer hardware GRUCell circuit module. It also avoids the problem that the hardware 18-layer convolutional neural network occupies too much hardware space, and has extremely high practicability.
[0056] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims. The information disclosed in the background technology section of this article is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as an admission or in any form that the information constitutes prior art known to those skilled in the art.
Claims
1. A ConvGRU neural network circuit for realizing color image recognition, characterized in that: Including convolutional neural network module, GRUCell circuit module and fully connected layer circuit module; The output of the convolutional neural network module is connected to the input of the GRUCell circuit module, and the output of the GRUCell circuit module is connected to the fully connected layer circuit module; The training method of the ConvGRU neural network circuit for realizing color image recognition comprises the following steps: Step 1, software preprocessing: use software to matrix the training color image and convert it into a training image pulse signal for input into the ConvGRU neural network circuit in a Gaussian coding manner; Step 2: input the training image pulse signal obtained in step 1 into the convolutional neural network module in the ConvGRU neural network circuit for feature extraction, and then input the feature matrix pulse signal output by the convolutional neural network module into the GRUCell circuit module in the ConvGRU neural network circuit for training, and then update the weight of the GRUCell circuit module and the weight of the fully connected layer circuit module according to the training completion pulse signal output by the GRUCell circuit module; Step 3, repeat the above steps 1 and 2 to process the training color images in the training data set one by one, the GRUCell circuit module completes 7 trainings as a batch, all the training color images in the training data set complete one training as an epoch, run 20 epochs, and retain the weight of the GRUCell circuit module and the weight of the fully connected layer circuit module after the last training is completed, that is, the ConvGRU neural network circuit training is completed.
2. The ConvGRU neural network circuit for realizing color image recognition according to claim 1, characterized in that: The convolutional neural network module includes a convolution calculation unit and a convolution acceleration circuit; the output of the convolution calculation unit is input into the convolution acceleration circuit in the form of a pulse signal, and then output by the convolution acceleration circuit to the GRUCell circuit module.
3. The ConvGRU neural network circuit for realizing color image recognition according to claim 2, characterized in that: The convolution calculation unit adopts a 3-layer convolutional neural network, and the convolution acceleration circuit adopts a 1T1R array.
4. The ConvGRU neural network circuit for realizing color image recognition according to any one of claims 1 to 3, characterized in that: The convolutional neural network module adopts a convolutional neural network accelerator based on FPGA.
5. The ConvGRU neural network circuit for realizing color image recognition according to any one of claims 1 to 3, characterized in that: The GRUCell circuit module adopts a single-layer unidirectional GRUCell circuit module.
6. The ConvGRU neural network circuit for realizing color image recognition according to claim 1, characterized in that: The convolutional neural network module includes a convolutional calculation unit and a convolutional acceleration circuit; the training image pulse signal enters the convolution layer of the convolutional calculation unit, enters the pooling layer through the convolution kernel scanning for dimension reduction and feature extraction, and then outputs the feature matrix to the convolution acceleration circuit in the form of a pulse signal, and then the convolution acceleration circuit outputs the feature matrix pulse signal, which is the feature matrix pulse signal output by the convolutional neural network module.
7. The method for using the ConvGRU neural network circuit for realizing color image recognition according to any one of claims 1 to 6, characterized in that: include: The ConvGRU neural network circuit for realizing color image recognition has ten output ports, and the ten output ports represent 10 different image types respectively; First, the color image to be detected is preprocessed by software, and then the image information after software preprocessing is input into the trained ConvGRU neural network circuit for color image recognition for processing. The output port with the strongest pulse signal proves that the output port is valid, and the color image classification result is obtained.
8. A ConvGRU neural network circuit system for realizing color image recognition, characterized in that: A ConvGRU neural network circuit for realizing color image recognition according to any one of claims 1 to 6.
Citation Information
Patent Citations
Face recognition method and system based on spatio-temporal feature fusion and sample attention enhancement
CN113239866A