A method and device for generating frequency-coded pulse data
By converting the time encoding of the pulsed neural network into frequency encoding, the problem that traditional neuromorphic chips do not support multiple encoding formats is solved, and the fusion and compatibility of multiple encodings is achieved.
Patent Information
- Application Number
- CN202010444119.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-22
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2040-05-22
AI Technical Summary
Traditional neuromorphic chips do not support more than one pulse encoding format, resulting in the inability to fuse multiple encodings in the pulsed neural network.
By converting the time-coded pulse data of the pulse neural network into frequency values, multiple conversion functions are used to generate frequency-coded pulse data, supporting the fusion and compatibility of multiple encoding formats.
The neuromorphic chip supports more than one pulse encoding format, realizes the conversion between time encoding and frequency encoding in the pulsed neural network, and provides the fusion capability and compatibility of multiple encodings.
Smart Images

Figure CN113705768B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of neural network technology, and in particular to a method and device for generating frequency-coded pulse data. Background Art
[0002] Spiking neural networks are networks that encode information in the time dimension, using different encoding methods. Traditional neuromorphic chips often do not support more than one spike encoding format, making it difficult to integrate multiple encodings in implemented spiking neural networks. Summary of the Invention
[0003] To solve the above problems, the present invention aims to provide a method and apparatus for generating frequency-coded pulse data, which supports more than one pulse coding format and provides the capability of fusing multiple codes and the compatibility of multiple coding processes.
[0004] The present invention provides a method for generating frequency-coded pulse data, which is used in a spiking neural network and comprises:
[0005] The time-coded pulse data of the pulse neural network is converted into a frequency value through one or more conversion functions, and the frequency-coded pulse data of the pulse neural network is generated according to the frequency value.
[0006] As a further improvement of the present invention, the step of converting the time-coded pulse data of the spiking neural network through one or more conversion functions to obtain a frequency value, and generating the frequency-coded pulse data of the spiking neural network based on the frequency value, comprises: traversing all time periods, converting the time t of the first pulse of the time coding of the spiking neural network in each time period into the frequency-coded pulse emission frequency n of the spiking neural network through one or more conversion functions, generating random pulses based on the pulse emission frequency n, and generating the frequency-coded pulse data of the spiking neural network;
[0007] Wherein, t is greater than or equal to 0, and n is greater than or equal to 0.
[0008] As a further improvement of the present invention, the time t of the first pulse in each time period of the time encoding of the spiking neural network is converted into the pulse emission frequency n of the frequency encoding of the spiking neural network through one or more conversion functions, including:
[0009] The time encoding of the spike neural network in each time period is the first pulse at the time t as the first value, and the first conversion function f is used to convert the first pulse into the first value. TM (t) Convert the first value t into a second value v, v=f TM (t);
[0010] Through the second conversion function f MR (v) converting the second value v into a third value n, and using the third value n as the pulse emission frequency n of the frequency encoding of the spiking neural network, n=f MR (v) = f MR (f TM (t)).
[0011] As a further improvement of the present invention, the first conversion function f TM (t) is [0,R]->[V min ,V max ] is a monotonic function, the second conversion function f MR (v) is [V min ,V max ]->[0,R];
[0012] Where R represents the number of moments in each time period of the time code, V min and V max Respectively represent the minimum and maximum values of the second value v, and R is greater than 0.
[0013] As a further improvement of the present invention, the first conversion function is: TM (t) = t / R*(V max -V min )+V min , the second conversion function is: f MR (v)=(vV min ) / (V max -V min )*R.
[0014] As a further improvement of the present invention, the time t of the first pulse in each time period of the time encoding of the spiking neural network is converted into the pulse emission frequency n of the frequency encoding of the spiking neural network through one or more conversion functions, including:
[0015] The time encoding of the spike neural network is converted into the time t of the first pulse in each time period by a conversion function f TR (t) Convert the pulse emission frequency n into the frequency encoding of the pulse neural network, n = f TR (t).
[0016] The present invention also provides a device for generating frequency-coded pulse data, the device comprising:
[0017] A mapping lookup table, configured to convert the time-coded pulse data of the spiking neural network into a frequency value through one or more functions;
[0018] A pulse generator is used to generate frequency-encoded pulse data of the pulse neural network according to the frequency value.
[0019] As a further improvement of the present invention, the mapping lookup table is used to traverse all time periods, and convert the time t of the first pulse of the time encoding of the spiking neural network in each time period into the pulse emission frequency n of the frequency encoding of the spiking neural network through one or more conversion functions;
[0020] Wherein, t is greater than or equal to 0, and n is greater than or equal to 0.
[0021] As a further improvement of the present invention, the mapping lookup table is used to take the time t of the first pulse of the time encoding of the pulse neural network in each time period as the first value, and to convert the first value into the first value through the first conversion function f TM (t) Convert the first value t into a second value v, v=f TM (t); and through the second conversion function f MR (v) converting the second value v into a third value n, and using the third value n as the pulse emission frequency n of the frequency encoding of the spiking neural network, n=f MR (v) = f MR (f TM (t)).
[0022] As a further improvement of the present invention, the first conversion function f TM (t) is [0,R]->[V min ,V max ] is a monotonic function, the second conversion function f MR (v) is [V min ,V max ]->[0,R];
[0023] Where R represents the number of moments in each time period of the time code, V min and V max Respectively represent the minimum and maximum values of the second value v, and R is greater than 0.
[0024] As a further improvement of the present invention, the first conversion function is: TM (t) = t / R*(V max -V min )+V min , the second conversion function is: f MR (v)=(vV min ) / (V max -V min )*R.
[0025] As a further improvement of the present invention, the mapping lookup table is used to convert the time encoding of the spike neural network into the time t of the first pulse in each time period through a conversion function f TR (t) Convert the pulse emission frequency n into the frequency encoding of the pulse neural network, n = f TR (t).
[0026] As a further improvement of the present invention, the device further includes:
[0027] Adder, used to calculate the current moment;
[0028] Register A, used to record the result calculated by the adder;
[0029] Register B is used to record the time t of the first pulse of the time code of the spiking neural network in the current time period;
[0030] Register C is used to record the pulse emission frequency n of the frequency encoding of the pulse neural network converted by the mapping lookup table.
[0031] As a further improvement of the present invention, the pulse generator is a Poisson distribution random number generator, which is used to generate n-Poisson distributed random pulses according to the pulse emission frequency n in each time period.
[0032] As a further improvement of the present invention, the pulse generator is a counter, which is used to stop emitting pulses after emitting n consecutive pulses according to the pulse emission frequency n in each time period.
[0033] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method.
[0034] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method described.
[0035] The beneficial effects of the present invention are:
[0036] The neuromorphic chip can support more than one pulse coding format, so that in the implemented pulse neural network, the conversion between the time coding and frequency coding of the pulse neural network can be realized, providing the ability to integrate multiple codings and the compatibility of multiple coding processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] To more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0038] Figure 1 This is a flow chart of a method for generating frequency-coded pulse data according to an exemplary embodiment of the present disclosure;
[0039] Figure 2 A schematic diagram of time coding according to an exemplary embodiment of the present disclosure;
[0040] Figure 3 A schematic diagram of frequency coding according to an exemplary embodiment of the present disclosure;
[0041] Figure 4 is a schematic diagram of a second value v according to an exemplary embodiment of the present disclosure;
[0042] Figure 5 The function f described in an exemplary embodiment of the present disclosure is TM Schematic diagram of (t);
[0043] Figure 6 The function f described in an exemplary embodiment of the present disclosure is MR (v) Schematic diagram;
[0044] Figure 7 The function f described in an exemplary embodiment of the present disclosure is TR Schematic diagram of (t);
[0045] Figure 8 The figure is a schematic diagram of a device for generating frequency-coded pulse data according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0046] The following will be combined with the accompanying drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0047] It should be noted that if the embodiments of the present disclosure involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications will also change accordingly.
[0048] In addition, in the description of the present disclosure, the terms used are for illustrative purposes only and are not intended to limit the scope of the present disclosure. The terms "include" and / or "comprise" are used to specify the presence of elements, steps, operations and / or components, but do not exclude the presence or addition of one or more other elements, steps, operations and / or components. The terms "first", "second" and the like may be used to describe various elements, do not represent an order, and do not limit these elements. In addition, in the description of the present disclosure, unless otherwise specified, "a plurality of" means two or more. These terms are only used to distinguish one element from another. In conjunction with the following drawings, these and / or other aspects become apparent, and it is easier for those skilled in the art to understand the description of the embodiments of the present disclosure. The accompanying drawings are used to depict the embodiments of the present disclosure for illustrative purposes only. Those skilled in the art will easily recognize from the following description that, without departing from the principles of the present disclosure, alternative embodiments of the structures and methods shown in the present disclosure may be adopted.
[0049] A method for generating frequency-coded pulse data according to an embodiment of the present disclosure is as follows: Figure 1 As shown, the method is used for a pulse neural network, converting the time-coded pulse data of the pulse neural network into a frequency value through one or more conversion functions, and generating frequency-coded pulse data of the pulse neural network based on the frequency value.
[0050] A spiking neural network is a network that encodes information in the time dimension. For example, the smallest unit of time in a spiking neural network's operation is a moment. At each moment, a pulse may or may not occur. The pulse information at each moment is a binary variable, indicating the presence or absence of a pulse. For example, a time period contains R moments. The time dimension can contain multiple time periods.
[0051] There are many ways to encode pulse neural networks. Figure 2 As shown in , time coding means that only one pulse is emitted in a time period, and the time coding information can be expressed by the emission time of the pulse. Figure 3 As shown, frequency coding refers to the emission of a series of pulses within a time period. The frequency coding information can be represented by the emission frequency of the pulses. This frequency can refer to the expected value of the number of pulses emitted randomly, or the absolute number of pulses emitted non-randomly.
[0052] The pulse neural network disclosed in the present invention may adopt a LIF layer or a ConvLIF layer.
[0053] The LIF layer is used for:
[0054] According to the input value X at time t t The value I obtained after the full connection operation t , and the biovoltage value at time t-1 Determine the membrane potential value at time t Among them, I t =X t *W, W is the input value X t The weight of
[0055] According to the membrane potential value at time t Emission threshold V th , determine the pulse output value F at time t t ;
[0056] According to the output value F at time t t Determine whether to reset the membrane potential and set the voltage V reset Determine the reset membrane potential value in,
[0057] According to the reset membrane potential value Determine the biovoltage value at time t
[0058] Among them, the output value F at time t t As the input of the next layer cascaded with the LIF layer, the biological voltage value at time t As the input for calculating the membrane potential value at time t+1, the input value X t All are discrete values.
[0059] The ConvLIF layer is used to:
[0060] According to the input value X at time t t The value I obtained after the convolution operation t , and the biovoltage value at time t-1 Determine the membrane potential value at time t Among them, I t =Conv(X t ,W,), W is the input value X t The weight of
[0061] According to the membrane potential value at time t With the emission threshold V th , determine the output value F at time t t;
[0062] According to the output value F at time t t Determine whether to reset the membrane potential and set the voltage V reset Determine the reset membrane potential value in,
[0063] According to the reset membrane potential value Determine the biovoltage value at time t
[0064] Among them, the output value F at time t t As the input of the next layer cascaded with the ConvLIF layer, the biological voltage value at time t As the input for calculating the membrane potential value at time t+1, the input value X t All are discrete values.
[0065] Among them, according to the membrane potential value at time t and the emission threshold V th , determine the output value at time t, including:
[0066] If the membrane potential value at time t is Greater than or equal to the emission threshold V th , then the output value at time t is determined to be 1;
[0067] If the membrane potential value at time t is Less than the emission threshold V th , then the output value at time t is determined to be 0.
[0068] Among them, according to the reset membrane potential value Determine the biovoltage value at time t Including: Reset membrane potential value through Leak activation function Calculate and determine the biovoltage value at time t α is the leakage parameter and β is the bias.
[0069] In an optional embodiment, the time-coded pulse data of the pulse neural network is converted through one or more conversion functions to obtain a frequency value, and the frequency-coded pulse data of the pulse neural network is generated according to the frequency value, which may include: traversing all time periods, converting the time coding of the pulse neural network into the moment t of the first pulse in each time period at which the pulse is coded, through one or more conversion functions, the frequency-coded pulse emission frequency n of the pulse neural network, generating random pulses according to the pulse emission frequency n, and generating frequency-coded pulse data of the pulse neural network; wherein t is greater than or equal to 0, t=0 indicates that the time-coded pulse data has no pulses in the current time period, and n is greater than or equal to 0, n=0 indicates that the number of pulses generated by the frequency-coded pulse data in the current time period is 0.
[0070] Wherein, t and n can be integers, for example, the conversion process between the time t of the first pulse and the pulse emission frequency n can be implemented by a digital circuit. t and n can also be non-integers, for example, the conversion process between the time t of the first pulse and the pulse emission frequency n can be implemented by an analog circuit.
[0071] In an optional embodiment, the time encoding of the spiking neural network, i.e., the time t at which the first pulse in each time period is located, is converted into the pulse emission frequency n of the frequency encoding of the spiking neural network by one or more conversion functions, including:
[0072] The time encoding of the spike neural network in each time period is the first pulse at the time t as the first value, through the first conversion function f TM (t) Convert the first value t into the second value v, v = f TM (t); through the second conversion function f MR (v) Convert the second value v into a third value n, and use the third value n as the pulse emission frequency n of the frequency encoding of the pulse neural network, n=f MR (v) = f MR (f TM (t)). The above method can be understood as using the pulse emission time and pulse emission frequency to realize the conversion from time encoding to frequency encoding through multiple conversion functions. The second value v can be, for example, a saturated voltage value, such as Figure 4 As shown, the minimum time unit is a time period, and the information of each time period is represented by a [V min , V max ] is represented by the value between ].
[0073] In another optional embodiment, the first conversion function f TM (t) is [0,R]->[V min ,V max ] is a monotonic function, the second conversion function fMR (v) is [V min ,V max ]->[0,R], where R represents the number of moments in each time period of the time code, V min and V max Respectively represent the minimum and maximum values of the second value v, and R is greater than 0. The first conversion function and the second conversion function of the present disclosure can be designed as monotonic functions according to the pulse signal, so that the probability of data distortion during the conversion process can be reduced. The present disclosure does not impose any specific restrictions on the conversion function.
[0074] In an optional implementation, the first conversion function may be: TM (t) = t / R*(V max -V min )+V min ; The second conversion function can be: f MR (v)=(vV min ) / (V max -V min )*R. For example, Figure 5 As shown, the first conversion function f TM (t) can be a linear monotonic function, such as Figure 6 As shown, the second conversion function can be f MR (v)=sigmoid(v). The first conversion function and the second conversion function may also be other monotonic functions, and the present disclosure does not impose any specific limitation on the monotonic function forms of the first conversion function and the second conversion function.
[0075] In an optional embodiment, the time encoding of the spiking neural network at the time t of the first pulse in each time period is converted into the pulse emission frequency n of the frequency encoding of the spiking neural network through one or more conversion functions, including: converting the time encoding of the spiking neural network at the time t of the first pulse in each time period into the pulse emission frequency n of the frequency encoding of the spiking neural network through a conversion function f TR (t) Convert the pulse emission frequency n into the frequency encoding of the pulse neural network, n = f TR (t). The above method can be understood as using the pulse emission time and pulse emission frequency to realize the conversion from time encoding to frequency encoding through a conversion function. For example, if the conversion function is relatively simple, the conversion f MR (f TM ) can be completed in one step, and f can be achieved in one conversion MR (f TM (t))=n. For example, Figure 7 As shown, f TR (t) can be a logarithmic function.
[0076] A frequency coding generating device according to an embodiment of the present disclosure, such as Figure 8 As shown, the device includes:
[0077] A mapping lookup table, the mapping lookup table is used to convert the time-coded pulse data of the spiking neural network into a frequency value through one or more functions;
[0078] The pulse generator is used to generate frequency-encoded pulse data of the pulse neural network according to the frequency value.
[0079] In an optional embodiment, a mapping lookup table is used to traverse all time periods, and convert the time t of the first pulse of the time coding of the spiking neural network in each time period into the pulse emission frequency n of the frequency coding of the spiking neural network through one or more conversion functions, wherein t is greater than or equal to 0, and t=0 indicates that the time coding pulse data has no pulses in the current time period, and n is greater than or equal to 0, and n=0 indicates that the number of pulses generated by the frequency coding pulse data in the current time period is 0. t and n can be integers, for example, the conversion process of the time t of the first pulse and the pulse emission frequency n can be implemented by a digital circuit. t and n can also be non-integers, for example, the conversion process of the time t of the first pulse and the pulse emission frequency n can be implemented by an analog circuit.
[0080] In an optional embodiment, the mapping lookup table is used to take the time encoding of the spiking neural network at the time t of the first pulse in each time period as the first value, and to convert the first value into the first value through the first conversion function f TM (t) Convert the first value t into the second value v, v = f TM (t), through the second conversion function f MR (v) Convert the second value v into a third value n, and use the third value n as the pulse emission frequency n of the frequency encoding of the pulse neural network, n=f MR (v) = f MR (f TM (t)). Here it can be understood that the mapping lookup table processes f MR (f TM The mapping lookup table uses the pulse emission time and the pulse emission frequency to realize the conversion from time encoding to frequency encoding through multiple conversion functions. The second value v can be, for example, a saturated voltage value, such as Figure 4 As shown, the minimum time unit is a time period, and the information of each time period is represented by a [V min , V max ] is represented by the value between ].
[0081] In an optional embodiment, the first conversion function f TM (t) is [0,R]->[V min ,Vmax ] is a monotonic function, the second conversion function f MR (v) is [V min ,V max ]->[0,R], where R represents the number of moments in each time period of the time code, V min and V max Respectively represent the minimum and maximum values of the second value v, and R is greater than 0. The first conversion function and the second conversion function of the present disclosure can be designed as monotonic functions according to the pulse signal, which can reduce the probability of data distortion during the conversion process. The present disclosure does not impose any specific restrictions on the conversion function.
[0082] In an optional implementation, the first conversion function may be: TM (t) = t / R*(V max -V min )+V min ; The second conversion function can be: f MR (v)=(vV min ) / (V max -V min )*R. For example, Figure 5 As shown, the first conversion function f TM (t) can be a linear monotonic function, such as Figure 6 As shown, the second conversion function can be f MR (v)=sigmoid(v). The first conversion function and the second conversion function may also be other monotonic functions, and the present disclosure does not impose any specific limitation on the monotonic function forms of the first conversion function and the second conversion function.
[0083] In an optional embodiment, the mapping lookup table is used to convert the time encoding of the spiking neural network to the time t of the first pulse in each time period through a conversion function f TR (t) Convert the pulse emission frequency n into the frequency encoding of the pulse neural network, n = f TR (t). The mapping lookup table uses the pulse emission time and the pulse emission frequency to realize the conversion from time encoding to frequency encoding through a function. For example, if the conversion function is relatively simple, the conversion f MR (f TM ) can be completed in one step, and f can be achieved in one conversion MR (f TM (t))=n. For example, Figure 7 As shown, f TR (t) can be a logarithmic function.
[0084] In an optional embodiment, the device further comprises:
[0085] Adder, used to calculate the current moment;
[0086] Register A is used to record the result of the adder calculation;
[0087] Register B is used to record the time t of the first pulse of the time-coded pulse data of the spiking neural network in the current time period;
[0088] Register C is used to record the pulse emission frequency n of the frequency encoding of the pulse neural network converted by the mapping lookup table.
[0089] At the beginning of each time period, an adder begins calculating the current time (which can be the number of times within the current time period, i.e., the current time falls within the current time period). Register A records the result of the adder's calculation and is cleared after the current time period ends, until the next time period arrives and recording begins again. At the beginning of each time period, register B records the time t of the first pulse of the time-coded pulse data input within the current time period (which can be the time within the current time period where the first pulse falls, with all other times within the current time period being 0). After the current time period ends, it is cleared after the current time period ends and recording begins again at the next time period. Register C records the converted frequency-coded pulse emission frequency n output by the mapping lookup table (which can be the expected value of the number of pulses in a random pulse emission or the absolute number of pulses in a non-random pulse emission). After the current time period ends, it is cleared after the current time period ends and recording begins again at the next time period. Register C can be a ping-pong register that continuously records the converted pulse emission frequency n for each time period, allowing for pipelined data processing and improving the device's computational efficiency.
[0090] In an optional embodiment, the pulse generator is a Poisson-distributed random number generator configured to generate random pulses with an n-Poisson distribution according to a pulse emission frequency n within each time period. Within each time period, a random number n following a Poisson distribution is generated according to the pulse emission frequency n, and pulses are emitted according to the random number n. When a new time period arrives, a reset signal resets the generator, and the generator then continues to generate random numbers and emit random pulses according to the new pulse emission frequency n.
[0091] In an optional embodiment, the pulse generator is a counter configured to stop emitting pulses after emitting n consecutive pulses at the pulse emission frequency n within each time period. According to the pulse emission frequency n, after emitting n consecutive 1s (i.e., pulses), the counter may output 0 (i.e., stop emitting pulses) until a new time period arrives, when a reset signal resets the counter and the counter then continues emitting pulses at the new pulse emission frequency n.
[0092] The present disclosure also relates to an electronic device, including a server, a terminal, etc. The electronic device includes: at least one processor; a memory communicatively connected to the at least one processor; and a communication component communicatively connected to a storage medium, the communication component receiving and sending data under the control of the processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the method for generating frequency-coded pulse data in the above-mentioned embodiment.
[0093] In an optional embodiment, the memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor executes the non-volatile software programs, instructions, and modules stored in the memory to perform various functional applications and data processing of the device, thereby implementing the above-mentioned method for generating frequency-coded pulse data.
[0094] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store a list of options, etc. In addition, the memory may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to an external device via a network. Examples of the aforementioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0095] One or more modules are stored in the memory, and when executed by one or more processors, perform the method for generating frequency-coded pulse data in any of the above method embodiments.
[0096] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method for generating frequency-coded pulse data provided in the embodiment of the present application.
[0097] The present disclosure also relates to a computer-readable storage medium for storing a computer-readable program, wherein the computer-readable program is used for enabling a computer to execute part or all of the above-mentioned embodiments of the method for generating frequency-coded pulse data.
[0098] That is, those skilled in the art will understand that all or part of the steps in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a program, which is stored in a storage medium and includes a number of instructions for causing a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps in the various embodiments of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.
[0099] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0100] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features that are included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
[0101] It will be understood by those skilled in the art that although the present invention has been described with reference to exemplary embodiments, various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the present invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the present invention without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed, but is intended to encompass all embodiments falling within the scope of the appended claims.
Claims
1. A device for generating frequency-coded pulse data, characterized in that: The device is used for a spiking neural network of a neuromorphic chip, and includes a mapping lookup table, a pulse generator, a register A, a register B, a register C, and an adder, wherein: The adder is communicatively connected to the register A and is used to calculate the current time at the beginning of each time period; The register A is used to record the result calculated by the adder; The register B is configured to respond to the pulse data of the time code of the spiking neural network inputted in the current time period and record the time t of the first pulse of the time code of the spiking neural network in the current time period based on the result recorded in the register A; The mapping lookup table is respectively connected to the register B and the register C for traversing all time periods and converting the time t of the first pulse of the time encoding of the spiking neural network in each time period into the pulse emission frequency n of the frequency encoding of the spiking neural network through one or more conversion functions, wherein t is greater than or equal to 0 and n is greater than or equal to 0; The register C is used to record the pulse emission frequency n of the frequency code of the pulse neural network converted by the mapping lookup table, using a ping-pong register to continuously record the pulse emission frequency n after conversion in each time period, and perform pipeline processing on the data; The pulse generator is used to obtain the pulse emission frequency n recorded in the register C in each time period, generate frequency-encoded pulse data of the pulse neural network according to the pulse emission frequency n, and output the frequency-encoded pulse data.
2. The device according to claim 1, wherein The mapping lookup table is used to take the time t of the first pulse of the time encoding of the spike neural network in each time period as the first value, and to convert the first value into the first value through the first conversion function f TM (t) Convert the first value t into a second value v, v=f TM (t); and through the second conversion function f MR (v) converting the second value v into a third value n, and using the third value n as the pulse emission frequency n of the frequency encoding of the spiking neural network, n=f MR (v) = f MR (f TM (t)).
3. The device according to claim 2, wherein The first conversion function f TM (t) is [0,R]->[V min ,V max ] is a monotonic function, the second conversion function f MR (v) is [V min ,V max ]->[0,R]; Among them, R represents the number of moments in each time period of the time code, V min and V max Respectively represent the minimum and maximum values of the second value v, and R is greater than 0.
4. The device according to claim 3, characterized in that The first conversion function is: TM (t) = t / R*(V max -V min )+V min , the second conversion function is: f MR (v)=(vV min ) / (V max -V min )*R.
5. The device according to claim 1, wherein The mapping lookup table is used to convert the time encoding of the spike neural network into the time t of the first pulse in each time period through a conversion function f TR (t) Convert the pulse emission frequency n into the frequency encoding of the pulse neural network, n = f TR (t).
6. The device according to claim 1, wherein The pulse generator is a Poisson distribution random number generator, which is used to generate n-Poisson distributed random pulses according to the pulse emission frequency n in each time period.
7. The device according to claim 1, wherein The pulse generator is a counter, which is used to stop emitting pulses after emitting n consecutive pulses according to the pulse emission frequency n in each time period.
Citation Information
Patent Citations
ARTIFICIAL ACTION POTENTIAL GENERATOR, CONVERTER AND ENCODER FOR PULSATED NEURAL NETWORKS
BR102015004646A2
Pulse output function for programmable logic controller with linear frequency change
CN102393674A