CN112215338A - Neural network computing method and device, electronic equipment and storage medium - Google Patents

Neural network computing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112215338A
CN112215338A CN202011082665.3A CN202011082665A CN112215338A CN 112215338 A CN112215338 A CN 112215338A CN 202011082665 A CN202011082665 A CN 202011082665A CN 112215338 A CN112215338 A CN 112215338A
Authority
CN
China
Prior art keywords
neural network
input signal
input signals
network computing
searching
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
CN202011082665.3A
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.)
Beijing Lynxi Technology Co Ltd
Original Assignee
Beijing Lynxi 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 Beijing Lynxi Technology Co Ltd filed Critical Beijing Lynxi Technology Co Ltd
Priority to CN202011082665.3A priority Critical patent/CN112215338A/en
Publication of CN112215338A publication Critical patent/CN112215338A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9017Indexing; Data structures therefor; Storage structures using directory or table look-up
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Neurology (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a neural network computing method and device, electronic equipment and a storage medium, and belongs to the technical field of artificial intelligence. The neural network computing method comprises the following steps: acquiring a plurality of input signals in the neural network; searching a corresponding calculation result in a lookup table according to the plurality of input signals; wherein, the look-up table stores a plurality of calculation results corresponding to the input signals. Therefore, the calculation results corresponding to the plurality of input signals can be stored in the lookup table, the calculation results corresponding to the plurality of input signals can be directly searched through the lookup table, and the input-weight multiplication accumulation process is completed without using excessive gates and adders, so that the calculation resource occupation and the power consumption overhead are reduced.

Description

Neural network computing method and device, electronic equipment and storage medium
Technical Field
The application belongs to the technical field of neural networks, and particularly relates to a neural network computing method and device, electronic equipment and a storage medium.
Background
The neural network is a data calculation model which simulates the behavior characteristics of an animal neural network and performs distributed parallel information processing. With the development of neural network technology, it has been applied in many fields, such as speech recognition, image recognition, computer vision, intelligent robot, fault diagnosis, real-time language translation, etc. In the calculation process of the neural network, a plurality of input signals are required to be involved, and the calculation operation of the corresponding weights of the input signals is required to be completed for the plurality of input signals. In the related art, the impulse neural network usually adopts a combination of a gate and an adder to realize the weight calculation, and the artificial neural network usually adopts a combination of a multiplier and an adder to realize the weight calculation, so that a gate or a multiplier needs to be arranged corresponding to each weight, and a large number of adders are needed to complete subsequent accumulation calculation, thereby causing the problems of large calculation resource occupation and large power consumption overhead.
Disclosure of Invention
An object of the embodiments of the present application is to provide a neural network computing method and apparatus, an electronic device, and a storage medium, which can solve the problems of a large amount of computing resources and a large power consumption overhead in the existing neural network computing method.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a neural network computing method, where the method includes:
acquiring a plurality of input signals in the neural network;
searching a corresponding calculation result in a lookup table according to the plurality of input signals;
wherein, the look-up table stores a plurality of calculation results corresponding to the input signals.
In a second aspect, an embodiment of the present application provides a neural network computing device, including:
an obtaining module, configured to obtain a plurality of input signals in the neural network;
the searching module is used for searching a corresponding calculation result in a searching table according to the plurality of input signals;
wherein, the look-up table stores a plurality of calculation results corresponding to the input signals.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In the embodiment of the application, a plurality of input signals in the neural network are obtained; searching a corresponding calculation result in a lookup table according to the plurality of input signals; wherein, the look-up table stores a plurality of calculation results corresponding to the input signals. Therefore, the calculation results corresponding to the plurality of input signals can be stored in the lookup table, the calculation results corresponding to the plurality of input signals can be directly searched through the lookup table, and the input-weight multiplication accumulation process is completed without using excessive gates and adders, so that the calculation resource occupation and the power consumption overhead are reduced.
Drawings
Fig. 1 is a flowchart of a neural network computing method provided in an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a lookup table provided in an embodiment of the present application;
FIG. 3 is a second schematic diagram of a lookup table according to an embodiment of the present application;
fig. 4 is a second flowchart of a neural network computing method according to an embodiment of the present application;
FIG. 5 is a third schematic diagram of a lookup table according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a neural network computing device provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The neural network computing method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Referring to fig. 1, fig. 1 is a flowchart of a neural network computing method provided in an embodiment of the present application, and as shown in fig. 1, the neural network computing method includes:
step 101, acquiring a plurality of input signals in a neural network.
Specifically, the Neural Networks (NNs) or Connection models (Connection models) are an algorithmic mathematical Model that simulates behavioral characteristics of animal Neural Networks and performs distributed parallel information processing.
The input signal is input to a neuron in the neural network, and the form of the input signal is determined by the type of the neural network. The input signal may be a binary signal, or may be another digital signal, or an analog signal. When the input signal is a binary signal, the input signal is one of any two values, for example, one of two values 0 and 1, one of two values 1 and 10, one of two values 7 and 8, or one of any two other values.
The corresponding values of the plurality of input signals at the same time can be the same or different; the corresponding values of the same input signal at different times may be the same or different.
Step 102, searching a corresponding calculation result in a lookup table according to a plurality of input signals; the lookup table stores calculation results corresponding to a plurality of input signals.
Specifically, the calculation result refers to a result of multiply-accumulate calculation of weights corresponding to a plurality of input signals. Assuming that the input signals are X1、X2、X3And X4And the weights corresponding to the 4 input signals are W1、W2、W3And W4If necessary, using a lookup table to calculate the corresponding calculation result X of the 4 input signals1*W1+X2*W2+X3*W3+X4*W4Then X needs to be added1、X2、X3And X4The corresponding calculation results at different values are stored in the lookup table 200 shown in fig. 2. For example, when the input signal is a binary signal of 0 or 1, when X is1、X2、X3And X4When the values of (1) are all 0, the corresponding calculation result is 0; when X is present1、X2、X3And X4When all the values of (1) are 1, the corresponding calculation result is W1+W2+W3+W4(ii) a When X is present1、X2、X3And X4When the values of (1) and (0) are 1, 1, 0 and 0, respectively, the corresponding calculation result is W1+W2Etc. ofTherefore, before using the lookup table 200 to look up the calculation results, the 16 possible calculation results need to be stored in the lookup table 200, and then X is used1、X2、X3And X4The value at the current time is used as an address signal to look up the corresponding calculation result from the look-up table 200. The number of the lookup tables may be one or more, and is not specifically limited in this application.
When the number of the lookup tables is one, a plurality of input signals are input into the lookup tables, and the calculation results corresponding to the input signals at the current moment are output from the lookup tables. Referring to fig. 3, fig. 3 is a second schematic structural diagram of the lookup table provided in the embodiment of the present application. As shown in FIG. 3, a plurality of input signals X1、X2、…、XMRespectively inputting from M address buses of a Look-UP Table (Look-UP-Table, abbreviated as LUT), wherein M is an integer larger than 1. By means of the numerical values corresponding to the input signals on each address bus, the search addresses corresponding to the current multiple input signals can be determined, further, the calculation results corresponding to the search addresses in the search table can be read, and the calculation results Y are output from the search table. For example, assume that the input signal is a binary signal and the input signal of the lookup table is X1、X2And X3Then 3 input signals exist 2 according to different values3The lookup addresses are corresponding to a calculation result, wherein the mapping relation between each lookup address and the calculation result is shown in a table I:
Figure BDA0002719247080000041
Figure BDA0002719247080000051
watch 1
The calculation result Y is1~Y8For an input signal X1、X2And X3The calculation result of multiplying and accumulating each weight is carried out at different values, and each input signalThe corresponding weight can be preset by a user in a precompilation stage of the neural network; or may be calculated by itself in the operation process of the neural network, and the application is not particularly limited.
In the embodiment, the calculation results corresponding to the plurality of input signals are stored in the lookup table, and the calculation results corresponding to the plurality of input signals are directly searched through the lookup table without using too many gates and adders to complete the input-weight multiplication accumulation process, so that the calculation resource occupation and the power consumption overhead are reduced.
Further, the input signal is a binary signal; the lookup table stores calculation results corresponding to a plurality of binary signals.
In this embodiment, the input signal is a binary signal having a value of 0 or 1. Therefore, the neural network calculation method provided by the embodiment of the present invention may be applied to a Spiking Neural Network (SNN), where the pulse signal in the Spiking neural network is used as the input signal of the lookup table. In particular, the calculation method provided by the invention can be applied to an inference process and a training process of the impulse neural network. The lookup table stores calculation results corresponding to a plurality of binary signals, and as shown in the first table, the binary signals can be used as address signals of the lookup table, so that a function of storing and searching the calculation results corresponding to a plurality of input signals through the lookup table is realized. And because the input signal is a binary signal, under the condition that the number of the input signals is certain, the calculation result required to be stored in the lookup table is much smaller than the non-binary signal with the same input number, thereby being beneficial to reducing the storage space of a single lookup table and improving the lookup efficiency.
When there are multiple look-up tables, referring to fig. 4, fig. 4 is a second flowchart of a neural network computing method provided in the embodiment of the present application, and as shown in fig. 4, after the step 101 of acquiring multiple input signals in the neural network, the method includes:
step 103, dividing the plurality of input signals into a plurality of input signal groups.
In this step, the plurality of input signals may be grouped according to the number of the look-up tables, and the plurality of input signals may be divided into a plurality of input signal groups, so that each look-up table only needs to look up the input signals in the input signal group corresponding to the look-up table. It should be noted that, here, the grouping of the plurality of input signals may be divided according to the actual needs of the neural network, and the number of the input signals in each input signal group may be the same or different, and the present application is not limited specifically.
And step 104, searching in a plurality of lookup tables according to the plurality of input signal packets respectively to obtain a plurality of calculation results corresponding to the plurality of input signal packets, wherein the plurality of lookup tables respectively store the calculation results corresponding to the plurality of input signal packets, and one lookup table corresponds to the calculation result of one input signal packet.
In this embodiment, the plurality of input signals are divided into a plurality of input signal groups, each input signal group includes at least one input signal, and the number of the input signals in each input signal group may be the same or different, which is not limited in the present invention. Because a plurality of input signal groups are arranged, the lookup tables with the same number as the input signal groups need to be arranged, so that the calculation results of the corresponding input signal groups can be stored through the plurality of lookup tables, and the storage space of a single lookup table is favorably reduced. For each input signal packet, the corresponding calculation result can be obtained by searching the calculation result corresponding to the input signal packet by using the lookup table corresponding to the input signal packet.
When the look-up table is multiple, referring to fig. 5, fig. 5 is a third schematic structural diagram of the look-up table provided in the embodiment of the present application, and as shown in fig. 5, a plurality of input signals are averagely divided into N input signal groups, and each input signal group includes N input signals. Each input signal group corresponds to one lookup table, and therefore N calculation results are obtained through the N lookup tables respectively. As shown in fig. 5, a first look-up table LUT1Corresponding to the first input signal packet, the input signal is X1、X2、…、XnThereby looking up the LUT in the first look-up table1In which X is required to be stored1、X2、…、XnAccording to the first look-up table LUT1Stored calculation result, and Y is obtained by searching1(ii) a Second look-up table LUT2Corresponding to a second input signal packet, the input signal being Xn+1、Xn+2、…、X2nThereby looking up the LUT in the second look-up table2In which X is required to be storedn+1、Xn+2、…、X2nAccording to a second look-up table LUT2Stored calculation result, and Y is obtained by searching2(ii) a Analogize in turn, the Nth look-up table LUTNCorresponding to the Nth input signal packet, the input signal is X(N-1)*n+1、X(N-1)*n+2、…、XN*nThus in the Nth look-up table LUTNIn which X is required to be stored(N-1)*n+1、X(N-1)*n+2、…、XN*nAccording to the Nth lookup table LUTNStored calculation result, and Y is obtained by searchingN. Thus, according to the N input signal groups and the N lookup tables, N calculation results can be finally obtained.
When the input number of the neurons in the neural network is relatively large, for example, the number of the input signals is greater than ten thousand, if the calculation results corresponding to all the input signals are stored in one lookup table, the memory size of a single lookup table is large, and the lookup speed of the single lookup table is reduced. In this embodiment, the plurality of input signals are divided into the plurality of input signal groups, and the plurality of lookup tables are established corresponding to the plurality of input signal groups, so that the storage space occupation of the lookup tables can be reduced, and the lookup speed of a single lookup table can be improved.
For example, when the number of the acquired input signals is 100, the 100 input signals are uniformly divided into 10 groups, and then only 2 need to be stored in one lookup table10Only 1KB of storage space is needed for calculation results; if the 100 input signals are input into a lookup table, 2 s need to be stored in the lookup table100The result of the calculation, the required storageThe space is large.
In this embodiment, the plurality of input signals are divided into the plurality of input signal groups, so that the storage space occupation of a single lookup table is reduced, the lookup efficiency of the single lookup table is also improved, and meanwhile, the plurality of input signal groups can be searched in parallel through the plurality of lookup tables, so that the overall lookup efficiency is further improved. Further, after the step 103 of respectively looking up in the plurality of look-up tables according to the plurality of input signal packets to obtain a plurality of calculation results corresponding to the plurality of input signal packets, the method further includes:
and 104, adding the plurality of calculation results to obtain a target calculation result.
With continued reference to fig. 5, the output ends of the lookup tables shown in fig. 5 are connected to an addition operation module, and the addition operation module can perform addition operation on the plurality of calculation results to finally obtain a target calculation result. It should be noted that the addition operation module may be an adder or an addition tree composed of a plurality of adders, and the number of the adders may be determined according to the specific number of the plurality of calculation results, which is not specifically limited in this application.
In this embodiment, a target calculation result is finally obtained by performing addition operation on a plurality of calculation results, which is beneficial to subsequently converting the target calculation result into the membrane potential of the neuron in the neural network and analyzing the membrane potential of the neuron.
Furthermore, the neural network is a pulse neural network, and the pulse neural network comprises a cell body module; after the step 104 of adding the plurality of calculation results to obtain the target calculation result, the method further includes:
105, converting a target calculation result into a membrane potential signal;
and 106, converting the membrane potential signal into a pulse signal through the cell body module.
The spiking neural network includes a cell module, in which a neuron model is stored, and the membrane potential can be transformed by the neuron model. Specifically, when the value of the membrane potential exceeds a preset threshold of the neuron model, the cell body module may output a pulse, thereby obtaining a pulse signal for inputting the pulse signal into a next neuron as an input signal of the next layer of neurons. The neuron model pre-stored in the cell body module may be any one of a Leak Integration and Fire (LIF) model, an Izhikevich model (where Izhikevich is a name of a person who proposes the model), a Hodgkin-Huxley model (HH model, where Hodgkin and Huxley respectively represent a person who proposes the model and anew Huxley), and the like, and the application is not limited specifically.
In this embodiment, the target calculation result is input to the cell body module, and the neuron model in the cell body module converts the target calculation result into a pulse signal, thereby implementing signal transmission between neurons in the neural network, so as to perform analog calculation on the entire neural network.
As another aspect of the invention, the invention also provides a neural network computing device. Referring to fig. 6, fig. 6 is a schematic structural diagram of a neural network computing device provided in an embodiment of the present application, where the neural network computing device 600 includes:
an obtaining module 601, configured to obtain a plurality of input signals in a neural network;
a lookup module 602, configured to lookup a corresponding calculation result in a lookup table according to a plurality of input signals;
the lookup table stores calculation results corresponding to a plurality of input signals.
Further, the input signal is a binary signal; the lookup table stores calculation results corresponding to a plurality of binary signals.
Further, the plurality of input signals comprises a plurality of input signal packets; the lookup module 602 is specifically configured to:
and respectively searching in a plurality of lookup tables according to the plurality of input signal groups to obtain a plurality of calculation results corresponding to the plurality of input signal groups, wherein the plurality of lookup tables respectively store the calculation results corresponding to the plurality of input signal groups, and one lookup table corresponds to the calculation result of one input signal group.
Further, the neural network computing device 600 further includes:
and the addition operation module is used for performing addition operation on the plurality of calculation results to obtain a target calculation result.
Further, the neural network is a pulse neural network; and the number of the first and second electrodes,
the acquisition module is used for acquiring pulse signals in the pulse neural network; the searching module is used for searching the corresponding calculation result in the searching table according to the plurality of pulse signals.
Further, the spiking neural network comprises a soma module;
the neural network computing device 600 further comprises:
the first conversion module is used for converting the target calculation result into a membrane potential signal;
and the second conversion module is used for converting the membrane potential signal into a pulse signal through the cell body module.
Further, the neural network computing device 600 stores a lookup table, and the lookup table stores a mapping relationship between a plurality of input signals and a computing result.
The neural network computing device in the embodiment of the present application may be a device, and may also be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The neural network computing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The neural network computing device provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to fig. 5, and is not described here again to avoid repetition.
Optionally, as shown in fig. 7, an electronic device 700 is further provided in this embodiment of the present application, and includes a processor 701, a memory 702, and a program or an instruction stored in the memory 702 and executable on the processor 701, where the program or the instruction is executed by the processor 701 to implement each process of the neural network computing method embodiment, and can achieve the same technical effect, and details are not repeated here to avoid repetition.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the neural network computing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device in the above embodiment. Readable storage media, including computer-readable storage media, such as Read-Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the methods of the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (15)

1. A neural network computing method, the method comprising:
acquiring a plurality of input signals in the neural network;
searching a corresponding calculation result in a lookup table according to the plurality of input signals;
wherein, the look-up table stores a plurality of calculation results corresponding to the input signals.
2. The neural network computing method of claim 1, wherein the input signal is a binary signal;
the lookup table stores calculation results corresponding to the binary signals.
3. The neural network computing method of claim 1, wherein the plurality of input signals comprises a plurality of input signal packets; the searching for the corresponding calculation result in the lookup table according to the plurality of input signals comprises:
and respectively searching in a plurality of lookup tables according to the plurality of input signal groups to obtain a plurality of calculation results corresponding to the plurality of input signal groups, wherein the plurality of lookup tables respectively store the calculation results corresponding to the plurality of input signal groups, and one lookup table corresponds to one calculation result of the input signal group.
4. The neural network computing method of claim 3, wherein after the searching in the plurality of look-up tables according to the plurality of input signal packets respectively to obtain a plurality of computation results corresponding to the plurality of input signal packets, the method further comprises:
and performing addition operation on the plurality of calculation results to obtain a target calculation result.
5. The neural network computation method of claim 4, wherein the neural network is a spiking neural network, and the input signal is a spiking signal of the spiking neural network.
6. The neural network computing method of claim 5, wherein the spiking neural network comprises a soma module;
after the adding operation is performed on the plurality of calculation results to obtain the target calculation result, the method further comprises:
converting the target calculation result into a membrane potential signal;
converting the membrane potential signal into a pulse signal through the soma module.
7. A neural network computing device, the device comprising:
an obtaining module, configured to obtain a plurality of input signals in the neural network;
the searching module is used for searching a corresponding calculation result in a searching table according to the plurality of input signals;
wherein, the look-up table stores a plurality of calculation results corresponding to the input signals.
8. The neural network computing device of claim 7, wherein the input signal is a binary signal;
the lookup table stores calculation results corresponding to the binary signals.
9. The neural network computing device of claim 7, wherein the plurality of input signals comprises a plurality of input signal packets; the search module is specifically configured to:
and respectively searching in a plurality of lookup tables according to the plurality of input signal groups to obtain a plurality of calculation results corresponding to the plurality of input signal groups, wherein the plurality of lookup tables respectively store the calculation results corresponding to the plurality of input signal groups, and one lookup table corresponds to one calculation result of the input signal group.
10. The neural network computing device of claim 9, wherein the device further comprises:
and the addition operation module is used for performing addition operation on the plurality of calculation results to obtain a target calculation result.
11. The neural network computing device of claim 9, wherein the neural network is a spiking neural network; and the number of the first and second electrodes,
the acquisition module is used for acquiring a pulse signal in the pulse neural network; the searching module is used for searching a corresponding calculation result in a searching table according to the pulse signals.
12. The neural network computing device of claim 11, wherein the spiking neural network comprises a soma module;
the device further comprises:
the first conversion module is used for converting the target calculation result into a membrane potential signal;
and the second conversion module is used for converting the membrane potential signal into a pulse signal through the cell body module.
13. The neural network computing device of any one of claims 7-12, wherein the device stores the look-up table, and the look-up table stores a mapping relationship between a plurality of input signals and a result of the computation.
14. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the neural network computing method of any one of claims 1-6.
15. A readable storage medium, on which a program or instructions are stored, which when executed by a processor, implement the steps of the neural network computing method of any one of claims 1-6.
CN202011082665.3A 2020-10-12 2020-10-12 Neural network computing method and device, electronic equipment and storage medium Pending CN112215338A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011082665.3A CN112215338A (en) 2020-10-12 2020-10-12 Neural network computing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011082665.3A CN112215338A (en) 2020-10-12 2020-10-12 Neural network computing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112215338A true CN112215338A (en) 2021-01-12

Family

ID=74054438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011082665.3A Pending CN112215338A (en) 2020-10-12 2020-10-12 Neural network computing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112215338A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113408713A (en) * 2021-08-18 2021-09-17 成都时识科技有限公司 Method for eliminating data copy, neural network processor and electronic product

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113408713A (en) * 2021-08-18 2021-09-17 成都时识科技有限公司 Method for eliminating data copy, neural network processor and electronic product
CN113408713B (en) * 2021-08-18 2021-11-16 成都时识科技有限公司 Method for eliminating data copy, neural network processor and electronic product

Similar Documents

Publication Publication Date Title
US20180018555A1 (en) System and method for building artificial neural network architectures
CN110222760B (en) Quick image processing method based on winograd algorithm
CN111260020B (en) Convolutional neural network calculation method and device
US20210019555A1 (en) Generating video frames using neural networks
CN110929865A (en) Network quantification method, service processing method and related product
CN114925320B (en) Data processing method and related device
CN115456167B (en) Lightweight model training method, image processing device and electronic equipment
US20220004849A1 (en) Image processing neural networks with dynamic filter activation
CN113723603A (en) Method, device and storage medium for updating parameters
CN112949835A (en) Inference method and device for knowledge graph based on convolution cyclic neural network
CN115860100A (en) Neural network model training method and device and computing equipment
CN109697083B (en) Fixed-point acceleration method and device for data, electronic equipment and storage medium
CN112215338A (en) Neural network computing method and device, electronic equipment and storage medium
CN112132281B (en) Model training method, device, server and medium based on artificial intelligence
CN117057258A (en) Black-start overvoltage prediction method and system based on weight distribution correlation coefficient
CN111354374A (en) Voice processing method, model training method and electronic equipment
WO2022063202A1 (en) Text classification method, apparatus, device, and storage medium
CN109697511B (en) Data reasoning method and device and computer equipment
CN113361621B (en) Method and device for training model
US20220138528A1 (en) Data processing method for neural network accelerator, device and storage medium
CN111916049B (en) Voice synthesis method and device
CN110826726B (en) Target processing method, target processing device, target processing apparatus, and medium
CN113761935A (en) Short text semantic similarity measurement method, system and device
TWI763975B (en) System and method for reducing computational complexity of artificial neural network
CN114003196B (en) Matrix operation device and matrix operation method

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