WO2023208178A1 - Information processing method and unit, chip, device, medium, and product - Google Patents

Information processing method and unit, chip, device, medium, and product Download PDF

Info

Publication number
WO2023208178A1
WO2023208178A1 PCT/CN2023/091515 CN2023091515W WO2023208178A1 WO 2023208178 A1 WO2023208178 A1 WO 2023208178A1 CN 2023091515 W CN2023091515 W CN 2023091515W WO 2023208178 A1 WO2023208178 A1 WO 2023208178A1
Authority
WO
WIPO (PCT)
Prior art keywords
neuron
target
information
membrane potential
storage
Prior art date
Application number
PCT/CN2023/091515
Other languages
French (fr)
Chinese (zh)
Inventor
吴臻志
何伟
祝夭龙
Original Assignee
北京灵汐科技有限公司
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
Priority claimed from CN202210473210.7A external-priority patent/CN114742213A/en
Priority claimed from CN202210468928.7A external-priority patent/CN114792129A/en
Application filed by 北京灵汐科技有限公司 filed Critical 北京灵汐科技有限公司
Publication of WO2023208178A1 publication Critical patent/WO2023208178A1/en

Links

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
    • 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
    • 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

Definitions

  • Embodiments of the present disclosure relate to the field of computer technology, and in particular, to an information processing method and a processing unit, a chip, an electronic device, a computer-readable storage medium, and a computer program product.
  • the neural network may include multiple neurons, at least some of the multiple neurons may communicate with each other through synapses, and corresponding weight values may be set between at least some of the synapses. Normally, the weight values are stored with a unified storage precision, and the storage precision is generally high.
  • the neuron information of the neurons can also be stored so that the neurons can perform processing actions based on the neuron information.
  • Embodiments of the present disclosure provide an information processing method and a processing unit, a chip, an electronic device, a computer-readable storage medium, and a computer program product.
  • embodiments of the present disclosure provide an information processing method, including: performing a processing operation on the information to be processed based on the difference information between the information to be processed and the target information of the neuron; wherein the information to be processed is Including the weight value of the neuron, the target information corresponding to the weight value includes a weight value interval, the processing operation includes a storage process of adjusting the storage accuracy of the weight value or a storage process of not adjusting the storage accuracy, and/or, the The information to be processed includes the membrane potential of the neuron, the target information corresponding to the membrane potential includes the resting potential, and the processing operation includes storage processing or discarding processing of the membrane potential.
  • the information processing method can be applied to weight storage, and the information processing method includes: dividing all weight values between neurons of the current processing core and neurons of the target processing core into multiple target weights. Reorganization, the target weight group includes multiple target weight values; for each target weight group, determine whether each target weight value in the target weight group is located within the target weight value range; if it is determined that each target weight If the values are all within the target weight value range, then each target weight value is stored according to the target storage precision, and the target storage precision is lower than the current storage precision of the target weight value.
  • the information processing method may be applied to a chip that simulates at least one neuron through at least one computing core it includes; the information processing method may include: obtaining each of the at least one neuron. a current membrane potential of the neuron; in response to the current membrane potential being different from the resting potential of the neuron, associated storage of the current membrane potential and the neuron information of the neuron; in response to the current The membrane potential is the same as the resting potential, and the current membrane potential is discarded.
  • embodiments of the present disclosure provide an information processing unit, including: a processing subunit configured to perform a processing operation on the information to be processed based on the difference information between the information to be processed and the target information of the neuron; Wherein, the information to be processed includes the weight value of the neuron, the target information corresponding to the weight value includes the weight value interval, and the processing operation includes storage processing of adjusting the storage accuracy of the weight value or storage without adjusting the storage accuracy. processing, and/or, the information to be processed includes the membrane potential of the neuron, the target information corresponding to the membrane potential includes the resting potential, and the processing operation includes storage processing or discarding processing of the membrane potential.
  • the processing subunit may include a weight storage device
  • the weight storage device may include: a dividing module configured to divide all weight values between neurons of the current processing core and neurons of the target processing core into Multiple target weight groups, the target weight group includes multiple target weight values; the judgment module is configured to determine for each target weight group whether each of the target weight values in the target weight group is located in the target weight value range within; a storage module configured to store each target weight value according to the target storage accuracy when the judgment module determines that each target weight value is located within the target weight value interval, and the target storage The accuracy is lower than the currently stored accuracy of the target weight value.
  • the processing subunit may include a neuron information processing device, which may be applied to a chip that simulates at least one neuron through at least one computing core it includes; the neuron information processing device
  • the device may include: an acquisition module configured to acquire a current membrane potential of each of the at least one neuron; a storage module configured to respond to the current membrane potential and the resting state of the neuron. If the potentials are different, the current membrane potential and the neuron information of the neuron are stored in association; in response to the current membrane potential being the same as the resting potential, the current membrane potential is discarded.
  • embodiments of the present disclosure provide a chip that simulates at least one neuron through at least one computing core it includes; wherein the computing core is configured to be based on the to-be-processed information and target information of the neuron. difference information between them, and perform the processing operation of the information to be processed; wherein the information to be processed includes the weight value of the neuron, the target information corresponding to the weight value includes the weight value interval, and the processing operation includes The storage processing in which the weight value adjusts the storage accuracy or the storage processing in which the storage accuracy is not adjusted, and/or the information to be processed includes the membrane potential of the neuron, and the target information corresponding to the membrane potential includes static information potential, and the processing operation includes storage processing or discarding processing of the membrane potential.
  • the chip simulates at least one neuron through at least one computing core it includes; wherein the computing core is configured to obtain the current membrane of each of the at least one neuron. potential; in response to the current membrane potential being different from the resting potential of the neuron, correlating and storing the current membrane potential and the neuron information of the neuron; in response to the current membrane potential being different from the resting potential Same, discard the current membrane potential.
  • embodiments of the present disclosure provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the embodiments of the present disclosure are implemented. Any information processing method.
  • embodiments of the present disclosure provide a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, any information processing method of the embodiments of the disclosure is implemented.
  • embodiments of the present disclosure provide a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code, wherein when the computer-readable code is in a processor of an electronic device When running, the processor in the electronic device executes the information processing method described in any one of the embodiments of the present disclosure.
  • Figure 1 is a flow chart of an information processing method provided by an embodiment of the present disclosure.
  • FIG. 2 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • FIG. 3 is a schematic diagram of a method of dividing target weight groups provided by an embodiment of the present disclosure.
  • FIG. 4 is a schematic diagram of a method of dividing target weight groups provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of a method of dividing target weight groups provided by an embodiment of the present disclosure.
  • Figure 6 is a flow chart of an information processing method provided by an embodiment of the present disclosure.
  • Figure 7 is a flow chart of an information processing method provided by an embodiment of the present disclosure.
  • FIG. 8 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
  • Figure 9 is a schematic diagram of a method for obtaining resting potential according to an embodiment of the present disclosure.
  • Figure 10 is a schematic flowchart of a method for obtaining current membrane potential according to an embodiment of the present disclosure.
  • Figure 11 is a schematic flowchart of a method for obtaining current membrane potential according to an embodiment of the present disclosure.
  • Figure 12 is a block diagram of an information processing unit provided by an embodiment of the present disclosure.
  • Figure 13 is a block diagram of a weight storage device provided by an embodiment of the present disclosure.
  • Figure 14 is a block diagram of a weight storage device provided by an embodiment of the present disclosure.
  • Figure 15 is a block diagram of a neuron information processing device provided by an embodiment of the present disclosure.
  • Figure 16 is a block diagram of a chip provided by an embodiment of the present disclosure.
  • Figure 17 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
  • Figure 18 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
  • Figure 19 is a block diagram of a computer-readable storage medium provided by an embodiment of the present disclosure.
  • a chip can be used to construct a neural network (for example, a neuromorphic chip). At least some of the multiple neurons in the neural network can communicate with each other through synapses, and at least some of the synapses can be provided with corresponding weight value.
  • neuron information of the neurons is usually stored in this type of chip, thereby facilitating the neurons to perform processing actions based on the neuron information.
  • the currently commonly used method is to store the neuron information of each neuron, so that each neuron can process accordingly based on its respective neuron information. This method of processing neuron information may cause neuron information to occupy too much storage space on the chip.
  • the weight values of neurons usually need to be stored, and the weight values of neurons are usually stored with a unified storage precision, and the storage precision is generally high to meet the storage of maximum and minimum values.
  • the storage precision is generally high to meet the storage of maximum and minimum values.
  • embodiments of the present disclosure provide an information processing method and a processing unit, a chip, an electronic device, a computer-readable storage medium, and a computer program product.
  • the information processing method of the embodiment of the present disclosure performs the processing operation of the information to be processed based on the difference information between the information to be processed and the target information of the neuron; wherein the information to be processed includes the weight value of the neuron and the target corresponding to the weight value.
  • the information includes a weight value interval
  • the processing operation includes a storage process that adjusts the storage accuracy of the weight value or a storage process that does not adjust the storage accuracy, and/or the information to be processed includes the membrane potential of the neuron, and the target information corresponding to the membrane potential includes Resting potential, the processing operation includes storage processing or discarding processing of the membrane potential.
  • the processing method of the embodiment of the present disclosure can adjust the storage accuracy of the weight value if necessary, so that it is possible Reducing the ineffective occupation of storage space is equivalent to improving the utilization of storage resources; on the other hand, when the information to be processed includes membrane potential, it can be determined through the difference information between the membrane potential and the resting potential.
  • the processing method of the embodiment of the present disclosure can only store the membrane potential of neurons in the working state, without storing the membrane potential in the non-working state.
  • the membrane potential of the neuron can effectively save storage space; similarly, when the information to be processed includes both, similar processing operations can be performed on the weight value and membrane potential respectively.
  • the information processing method of the embodiment of the present disclosure can be executed by electronic equipment such as a terminal device or a server.
  • the terminal device can be a vehicle-mounted device, user equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal Digital assistants (Personal Digital Assistant, PDA), handheld devices, computing devices, wearable devices, etc.
  • the information processing method can be implemented by the processor calling computer-readable program instructions stored in the memory.
  • the information processing method of the embodiment of the present disclosure may be executed through a server, where the server may be an independent physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.
  • embodiments of the present disclosure provide an information processing method.
  • Figure 1 is a flow chart of an information processing method provided by an embodiment of the present disclosure.
  • the information processing method includes:
  • step S1 based on the difference information between the neuron's information to be processed and the target information, a processing operation of the information to be processed is performed;
  • the information to be processed includes the weight value of the neuron, the target information corresponding to the weight value includes the weight value interval, and the processing operation includes storage processing of adjusting the storage accuracy of the weight value or storage processing without adjusting the storage accuracy, and/or,
  • the information to be processed includes the membrane potential of the neuron, the target information corresponding to the membrane potential includes the resting potential, and the processing operation includes storing or discarding the membrane potential.
  • the information processing method of the embodiment of the present disclosure may be applied to processing weight values.
  • the information to be processed may include the weight value of the neuron, and the corresponding target information may include a weight value interval.
  • the weight value interval may be a predetermined value range used to characterize the weight value.
  • the difference information about the two can be obtained.
  • This difference information can reflect the value relationship between the weight value and the weight value interval.
  • the difference information indicates that the weight value is located in the weight value interval. within, or the difference information indicates that the weight value is outside the weight value range.
  • the determined storage precision may be the current storage precision of the weight value, or it may be a new storage precision after adjusting the current storage precision.
  • multiple weight values can be grouped in advance to obtain at least one weight group (a weight group can include one or more weight values), and corresponding processing operations can be performed in units of weight groups.
  • the information to be processed includes multiple target weight values of at least one target weight group, the target information includes a target weight value interval, and the difference information is used to characterize the range relationship between the multiple target weight values of the target weight group and the target weight value interval.
  • the processing operation includes performing storage processing of multiple target weight values with adjusted storage accuracy in target weight group units, or performing storage processing of multiple target weight values without adjusting storage accuracy in target weight group units.
  • the information to be processed may correspond to one or more target weight groups, and each target weight group includes at least one target weight value.
  • each target weight group by comparing multiple target weight values and target weight value intervals in the target weight group, the relationship between the value ranges of the two can be clarified, thereby obtaining the corresponding difference information, and based on the difference information, the target can be targeted
  • Multiple target weight values in the weight group determine whether the storage accuracy needs to be adjusted. When it is determined that the storage accuracy needs to be adjusted, multiple target weight values in the target weight group are stored with the adjusted storage accuracy. When it is determined that no adjustment is required In the case of storage precision, multiple target weight values within the target weight group are stored based on the current storage precision.
  • the information processing methods of embodiments of the present disclosure may be applied to processing membrane potential.
  • the information to be processed includes the current membrane potential of the neuron
  • the target information includes the resting potential of the neuron
  • the difference information is used to characterize whether the current membrane potential of the neuron is the same as the resting potential of the neuron.
  • the processing operation Including the storage operation of the current membrane potential, or the discarding operation of the current membrane potential.
  • the current membrane potential when the current membrane potential is obtained, the current membrane potential is not stored directly, but by comparing whether the current membrane potential is the same as the resting potential, and based on the comparison result, it is determined whether to store the current membrane potential or discard the current membrane potential. .
  • the membrane potential is usually directly stored for later use.
  • This processing method does not take into account the working status of the neuron, but directly stores the membrane potential, so it may require more storage space.
  • the current working state of the neuron can be clarified through the current membrane potential and resting potential of the neuron, and based on this, it is determined whether the current membrane potential needs to be stored or whether the current membrane potential needs to be discarded, so it can be Reduce the amount of data that needs to be stored to a certain extent and reduce the amount of storage space occupied.
  • the information processing method of the embodiment of the present disclosure can be applied to at least the following processing processes:
  • FIG. 2 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to weight storage.
  • an embodiment of the present disclosure provides an information processing method, and the corresponding weight storage process may include:
  • Step S201 Divide multiple weight values between the neurons of the current processing core and the neurons of the target processing core into multiple target weight groups, and the target weight group includes multiple target weight values.
  • Many-core systems based on neuromorphic chips usually include multiple processing cores, and neurons can be loaded in at least some of the processing cores, and one or more neurons can be loaded in each processing core.
  • Weight data (for example, weight values) corresponding to the connection relationship between each neuron of the current processing core and other neurons of other processing cores is usually stored in advance. When a neuron fires a pulse, the predecessor neuron or successor neuron obtains the weight data and performs related calculations based on the weight data.
  • the weight value when the weight value is stored, it is stored in the form of a target weight group.
  • the target weight group is formed by dividing the current processing core (the current processing core can be any processing core loaded with neurons in the many-core system). ) and the neurons of the target processing core are divided according to the target weight division method.
  • the target weight group may include at least one target weight value, or may include multiple target weight values. Among them, the target weight group can be divided based on a variety of target weight division methods, and the embodiment of the present disclosure does not limit this.
  • dividing the multiple weight values between the neurons of the current processing core and the neurons of the target processing core into multiple target weight groups includes: obtaining the multiple neurons of the current processing core and the target processing core.
  • the weight value between multiple neurons; the weight value corresponding to at least one neuron in the current processing core is used as a target weight group.
  • the weight value of the neuron and each neuron in the target processing core can be obtained, and the weight value corresponding to a neuron in the current processing core can be used as a Target weight grouping.
  • all weight values between the neurons of the current processing core and the neurons of the target processing core can be divided according to the target weight division method, thereby obtaining one or more target weight groups.
  • At least part of the weight values between the neurons of the current processing core and the neurons of the target processing core can be divided according to the target weight division method, thereby obtaining one or more target weight groups.
  • FIG. 3 is a schematic diagram of a division method of a target weight group provided by an embodiment of the present disclosure.
  • FIG. 3 exemplarily shows a division method of weight values stored between the current processing core and the target processing core.
  • the target weight group is divided as follows: for each neuron in the current processing core, obtain the weight value of the neuron and each neuron in the target processing core, and combine one neuron in the current processing core
  • the weight value corresponding to the neuron is used as a target weight group, that is, using a neuron in the current processing core as an index, all weight values connected to the neuron in the target processing core are used as a target weight group.
  • neuron A1 in the current processing core can be used as an index to divide the weight values of all neurons connected to neuron A1 in the target processing core into a target weight group to divide the target weight group into
  • the storage precision of the weight value is stored with precision 1.
  • neuron A2 in the current processing core can also be used as an index to divide the weight values of all neurons connected to neuron A2 in the target processing core into a target weight group to store the weight values of the target weight group.
  • the precision is stored as precision 2.
  • the weight values corresponding to multiple neurons in the current processing core can also be used as a target weight group.
  • a target weight group For example, as shown in Figure 3, you can use neurons A3, A4, and A5 in the current processing core as indexes to divide the weight values of all neurons connected to neurons A3 to A5 in the target processing core into a target weight group.
  • the storage precision of the weight value of the target weight group is stored as precision 3.
  • FIG. 4 is a schematic diagram of a division method of a target weight group provided by an embodiment of the present disclosure.
  • FIG. 4 exemplarily shows a division method of weight values stored between the current processing core and the target processing core.
  • the target weight group is divided as follows: obtain the weight value between each neuron in the current processing core and at least one neuron in the target processing core, and combine each neuron in the current processing core with the target processing core.
  • the weight value between one neuron of the core is used as a target weight group, that is, using a neuron in the target processing core as an index, the weight value of each neuron in the current processing core connected to a neuron in the target processing core is The weight value serves as a target weight group.
  • neuron B1 in the target processing core can be used as an index to divide the weight values of all neurons connected to neuron B1 in the current processing core into a target weight group, so as to divide the target weight group into
  • the storage precision of the weight value is stored with precision 1.
  • neuron B3 in the target processing core can also be used as an index to divide the weight values of all neurons connected to neuron B3 in the current processing core into a target weight group to store the weight values of the target weight group.
  • the precision is stored as precision 2.
  • the weight values corresponding to multiple neurons in the target processing core can also be used as a target weight group.
  • neurons B5, B6, and B7 in the target processing core can be used as indexes to divide the weight values of all neurons connected to neurons B5 to B7 in the current processing core into a target weight group.
  • the storage precision of the weight value of the target weight group is stored as precision 3.
  • the source neuron (the neuron in the current processing core) is used as the index to determine the target weight group
  • the target neuron (the neuron in the target processing core) is used as the index to determine the target weight group.
  • both are two different weighted division forms based on the same division principle.
  • the target processing core can be the successor core of the current processing core, or the target processing core can be the successor processing core of the current processing core. The embodiments of the present disclosure do not limit this.
  • FIG. 5 is a schematic diagram of a division method of a target weight group provided by an embodiment of the present disclosure.
  • FIG. 5 exemplarily shows a division method of weight values stored between the current processing core and the target processing core.
  • the target weight group can use the weight value between some neurons in the current processing core and some neurons in the target processing core as a target weight group.
  • the weight values between the neurons A1 to A3 in the current processing core and the neurons B1 to B3 in the target processing core can be divided into a target weight group to store the weight of the target weight group.
  • the accuracy is stored as accuracy 1.
  • the weight values between the neurons A1 to A3 in the current processing core and the neurons B4 to B7 in the target processing core can also be divided into a target weight group to divide the target weight.
  • the reorganized weight storage precision is stored as precision 2. It should be noted that in this embodiment, the intersection between any two target weight groups among multiple target weight groups is an empty set (it can also be referred to as no intersection between any two target weight groups among multiple target weight groups). ).
  • the neuron of the current processing core and the target neuron of the target processing core can be obtained by querying the pre-stored corresponding weight value between the current neuron of the current processing core and the target neuron of the target processing core.
  • Multiple weight values between neurons of the target processing core can be obtained by querying the synaptic array used to store the weight values corresponding to the neurons in the current processing core.
  • Step S202 For each target weight group, determine whether multiple target weight values in the target weight group are within the target weight value range.
  • each target weight group it can be determined whether each target weight value is within the target weight value range. For example, for each target weight group, determine whether all target weight values in the target weight group are within the target weight value range.
  • the target weight value interval is a preset value interval used to determine the storage accuracy of the target weight value.
  • the determination condition of the target weight value interval may be: having at least a preset proportion of weights in the many-core system The value belongs to the target weight value range. For example, the preset ratio is 90%.
  • the determined target weight value range is usually smaller than the value range to which all weight values in the many-core system belong.
  • the numerical range to which all weight values in the many-core system belong is [-50, 50]
  • the target weight value range can be [-10, 10], where the target weight value range represents the large number of weights in the many-core system.
  • Some (for example, 90%) of the weight values belong to the numerical interval [-10,10].
  • the target weight value interval can be determined based on experience by those skilled in the art.
  • the target weight value range may be determined based on statistical calculations of all weight values included in the many-core system.
  • step S202 for each target weight group, if it is determined that multiple target weight values of the target weight group are located within the target weight numerical interval, it means that each target weight value in the target weight group belongs to a smaller numerical interval. Therefore, there may be no need to use a higher storage precision for storage. Therefore, step S203 can be performed to store multiple target weight values of the target weight group with a storage precision lower than the current storage precision, thereby reducing the occupation of storage space; When it is determined that at least one target weight value among the multiple target weight values in the target weight group is outside the target weight value range, it means that there may be a maximum value or a minimum value among the multiple target weight values in the target weight group.
  • Step S203 When the multiple target weight values of the target weight group are within the target weight value range, store the multiple target weight values according to the target storage precision, which is lower than the current storage precision of the target weight value.
  • Step S204 If at least one target weight value among the multiple target weight values in the target weight group is outside the target weight value range, keep the current storage accuracy of the multiple target weight values in the target weight group unchanged.
  • the target storage accuracy can be determined based on the target weight value interval, and the target storage accuracy should at least meet the storage byte requirements for the values included in the target weight value interval. For example, when the maximum value contained in the target weight value interval does not exceed 127 and the minimum value is not less than -128, the target storage precision can be set to an 8-bit integer (int8).
  • the target storage accuracy is lower than the current storage accuracy of the target weight value. This is because the target weight value range is compared with the values to which all weight values in the many-core system belong. The interval has been reduced, so the target storage accuracy must be lower than the current storage accuracy of the target weight value.
  • the type of the target storage precision in order to minimize the impact of storage precision on the weight value during subsequent changes, can be kept the same as the type of the current storage precision.
  • the type of the target storage precision can still be floating point.
  • the current storage precision can be floating point storage precision or integer storage precision.
  • the weight values between the neurons are divided into target weight groups, and for each target weight group, it is determined whether the weight values are all within the preset category. Within a smaller range of target weight value range, if so, the weight value will be stored with a storage precision lower than the current storage, thereby reducing the storage space occupied by the weight storage of the neuron, thereby reducing the storage of the neuromorphic chip.
  • the ineffective occupation of space reduces the storage requirements of neuromorphic chips, which is conducive to the expanded application of neuromorphic chips.
  • the target weight value may be stored based on the form of a data packet.
  • the target weight set may be stored in the form of data packets.
  • the format of the data packet is as follows:
  • cid represents the identification information of the target processing core
  • startaddr represents the address of the starting target neuron in the target processing core that is connected to a neuron in the current processing core
  • len represents the starting target of self-connection in the target processing core.
  • the address of the neuron starts from the number of continuously connected target neurons
  • acc represents the target storage accuracy
  • weight represents the weight value of each target, and each target weight value corresponds to the target neuron determined based on the fields startaddr and len.
  • the weight values of the neurons spaced between each target neuron can be set to zero, and the corresponding Stored in parameter weight.
  • the format of the data packet may be:
  • cid represents the identification information of the target processing core
  • addr represents the address of the target neuron
  • acc represents the target storage accuracy
  • weight represents the target weight value.
  • one neuron corresponds to at least one data packet
  • each data packet corresponds to a target processing core connected to the neuron
  • each data packet can have its own storage precision
  • multiple data packets corresponding to one neuron in the current processing core can be stored according to the target accuracy.
  • Classify storage instead of marking the storage accuracy in each data packet. That is, data packets with the same target storage accuracy are stored as one large data packet, as shown below.
  • the format of the large data packet can be:
  • acc represents the target storage accuracy
  • each set of addr and weight represents the data packet corresponding to a target processing core connected to a neuron in the current processing core as mentioned above.
  • addr represents the address of the target neuron
  • weight represents Target weight value.
  • all data packets corresponding to a neuron include 1000 32-bit floating point (fp32) data packets and 10 16-bit floating point (fp16) data packets
  • 1000 32-bit floating point type (fp16) data packets can be The data packets are stored together, and the storage precision is uniformly marked as fp32.
  • the 10 16-bit floating point data packets are stored together, and the storage precision is uniformly marked as fp16. This storage method can further reduce the storage space occupied by neuromorphic chips because it shares storage accuracy related fields.
  • the information related to the target processing core address in the above data packet can be expressed as the target neuron in the current processing core.
  • Corresponding address related information For example, cid represents the identification information of the current processing core, addr represents the address of the neuron in the current processing core, startaddr represents the address of the starting neuron in the current processing core that is connected to a neuron in the target processing core, and so on.
  • the target weight value in addition to the above-mentioned storage of the target weight value in the form of data packets, the target weight value can also be stored in the form of an array, which is not limited in the embodiment of the present disclosure.
  • Figure 6 is a flow chart of an information processing method provided by an embodiment of the present disclosure, which can be applied to weight storage.
  • the information processing method may also include:
  • Step S200 Determine the target weight value interval.
  • the target weight value range can be determined based on different methods.
  • the target weight value range can be determined based on experience by those skilled in the art.
  • the target weight value range may be determined by performing statistical calculations on all weight values included in the many-core system.
  • steps S201 to S204 please refer to the relevant content of the embodiments of the present disclosure, and the description will not be further elaborated here.
  • determining the target weight value range may include: obtaining multiple weight values included in the many-core system (for example, the multiple weight values may be all weight values included in the many-core system, or may be is at least part of the weight values); perform normal distribution statistics on the multiple weight values obtained, and determine the normal distribution rules of multiple weight values; calculate the weights whose distribution probability in the normal distribution rule satisfies the preset probability value The range is determined as the target weight value range.
  • Figure 7 is a flow chart of an information processing method provided by an embodiment of the present disclosure, which is used to describe some steps in the weight storage process.
  • step S200 the step of determining the target weight value interval, may include:
  • Step S2001 Obtain all weight values included in the many-core system.
  • Step S2002 Perform normal distribution statistics on all obtained weight values to determine the normal distribution rule of the weight values.
  • Step S2003 Determine the weight range in which the distribution probability in the normal distribution law satisfies the preset probability value as the target weight range.
  • the distribution of all weight values in the many-core system satisfies the normal distribution law. Therefore, the normal distribution statistics of all weight values included in the many-core system can be used to determine the normal distribution of all weight values in the many-core system. According to the normal distribution law, the target weight value range is determined based on the obtained normal distribution law.
  • step S2002 normal distribution statistics are performed on all weight values obtained in the many-core system to obtain a normal distribution rule of the weight values.
  • the normal distribution rule includes the expected value and standard deviation of the normal distribution.
  • step S2003 based on the determined expected value and standard deviation, it is determined by querying the standard normal distribution table that the distribution probability of the weight value satisfies the weight range corresponding to the preset probability value, and the weight range is determined as the target weight value interval, Among them, the distribution probability of the weight value satisfies the weight range corresponding to the preset probability value, which means that each weight value will be located in the weight range with a probability of not less than the preset probability value.
  • the target weight value range is (8 ,16).
  • Figure 8 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to membrane potential storage.
  • an embodiment of the present disclosure provides an information processing method, and the corresponding membrane potential storage process may include:
  • Step S802 Obtain the current membrane potential of at least one neuron.
  • obtaining the current membrane potential of at least one neuron may be obtaining the current membrane potential of one neuron, or obtaining the current membrane potential of multiple neurons, which is not limited in the embodiments of the present disclosure.
  • the membrane potential storage process can be applied to a chip, which can calculate The core simulates at least one neuron.
  • obtaining the current membrane potential of at least one neuron may be to obtain the current membrane potential of each neuron in the at least one neuron for the above calculation core.
  • the current membrane potential of at least one neuron may be obtained, or the current membrane potential of multiple neurons corresponding to multiple computing cores may be obtained.
  • the embodiments of the present disclosure are not limited to this.
  • the current membrane potential may refer to the voltage value generated by a neuron being stimulated by other neurons.
  • the neurons may be neurons in an artificial neural network or a spiking neural network.
  • the current membrane potential may refer to the current membrane potential of the neuron calculated based on stimulation signals emitted by other neurons connected to the neuron.
  • the process of obtaining the current membrane potential may include: obtaining multiple stimulation signals received by the neuron at the current moment, and weighting the multiple stimulation signals according to the weight corresponding to each stimulation signal to obtain the input potential. Based on the input potential, the current membrane potential of the neuron is obtained by combining the leakage voltage of the neuron and the membrane potential at the previous moment.
  • neuron A is connected to neurons B, C, and D through synapses 1, 2, and 3 respectively.
  • the stimulation signals currently sent by neurons B, C, and D to neuron A can be calculated based on the weights set for synapses 1, 2, and 3 (it can also be performed on the stimulation signals).
  • the processed signals) are weighted and summed to obtain the input potential of neuron A.
  • the input potential is summed with the membrane potential of neuron A at the previous moment, and the difference is calculated with the leakage potential of neuron A to obtain the membrane potential corresponding to neuron A.
  • Step S804 In response to the current membrane potential being different from the resting potential of the neuron, associate and store the current membrane potential and the neuron information of the neuron.
  • the resting potential refers to the potential of a neuron when it is not stimulated by other neurons. If the membrane potential of a neuron is equal to the resting potential, it means that the neuron has not been stimulated, that is, it is in a non-working state; if the membrane potential of the neuron is not equal to the resting potential, it means that the neuron has been stimulated, that is, it is in a non-working state. working status.
  • the chip may pre-allocate a storage space for storing neuron information of multiple neurons included in the chip (for example, for storing neuron information of all neurons included in the chip).
  • the neuron information can include the resting potential of the neuron, release threshold information, etc.
  • the process of obtaining the resting potential may include: obtaining neuron information corresponding to the neuron from the pre-allocated storage space, and obtaining the resting potential of the neuron therefrom.
  • the neuron information includes at least one of the following: release threshold, leakage value, resting potential.
  • release threshold a threshold for determining whether the neuron information is a threshold for determining whether the neuron information is a threshold for determining whether the neuron information is a threshold for determining whether the neuron information is a threshold for determining whether the neuron information is a threshold for determining whether the neuron information is a threshold for determining whether the neuron information is a threshold, leakage value, resting potential.
  • the above examples of neuron information are only examples, and the embodiments of the present disclosure do not limit this.
  • the neuron information can be pre-stored in the chip.
  • associated storage can be achieved by co-storing the identifier indicating the neuron information and the obtained current membrane potential.
  • the identifier can be a storage address indicating neuron information, and associative storage can be achieved by storing the storage address together with the obtained current membrane potential.
  • the identifier could be a neuron type number. Neurons corresponding to this type number have the same neuron information. Associative storage can also be achieved by storing the neuron type number together with the obtained current membrane potential. Among them, neurons can be divided into corresponding neuron types based on the resting potential, firing threshold and other information of the neuron, and each neuron type can be identified using the neuron type number.
  • the neurons simulated by the chip can be numbered in advance.
  • the current membrane potential and the neuron information of the neuron can be sequentially stored in association based on the preset neuron number identifier.
  • the chip can simulate 100 neurons numbered from 1 to 100, and can store the current membrane potential and the neuron information of each neuron in sequence in order from small to large.
  • Step S806 in response to the current membrane potential being the same as the resting potential, discard the current membrane potential.
  • the two sizes can be compared. If the two are different, it can mean that the neuron is stimulated by other neurons and the neuron is in a working state.
  • the membrane potential can be stored in association. If the two are the same, it means that the neuron is not stimulated by other neurons and the neuron is in a non-working state, and the membrane potential can be discarded.
  • a sparse network For example, in a sparse network, most of the neurons are usually in a non-working state. These neurons are not stimulated by other neurons, and only a small number of neurons are in a working state.
  • the information processing method of the embodiment of the present disclosure After performing relevant processing, only the membrane potential of a small number of neurons (that is, the membrane potential of neurons in working state) will be recorded, and the membrane potential of most neurons will be discarded, thus saving a lot of storage space.
  • the membrane potential of a neuron is equal to its resting potential, it can mean that the neuron is in a non-working state.
  • the membrane potential is not equal to the resting potential, which can mean that the neuron is in a working state. Therefore, in the embodiment of the present disclosure, By responding to the current membrane potential being different from the resting potential of the neuron, the neuronal information of the current membrane potential and the neuron is stored in association, and in response to the current membrane potential being different from the resting potential of the neuron, If the current membrane potential is discarded, only the membrane potential of the neuron in the working state can be stored, and there is no need to store the membrane potential of the neuron in the non-working state, thus saving storage space.
  • neurons of the same type have at least part of the same neuron information.
  • the chip can only store one copy of the same neuron information for neurons of the same type, and there is no need to store the same neuron information for each neuron.
  • Neuronal information e.g., the same resting potential
  • the above-mentioned storage of only one copy of neuron information usually does not change depending on whether the neuron is subject to external stimulation. This ensures that any neuron that shares this copy of neuron information will not be affected by any external stimulus. Stimulation causes changes in the shared neuron information or the neuron is unable to use the shared neuron information.
  • this type of neuron information may include any one or more of resting potential, release threshold, leakage value, etc.
  • neuron information of at least one neuron can be pre-stored in the chip according to neuron type.
  • Figure 9 is a schematic diagram of a method for obtaining resting potential according to an embodiment of the present disclosure. As shown in Figure 9, the process of obtaining the resting potential can include:
  • Step S902 Obtain the neuron type identifier of the neuron.
  • a chip may include multiple types of neurons.
  • the neuron type identifier may be a type identifier maintained in advance for each neuron of the chip.
  • a storage space can be pre-allocated for each neuron type in the chip, and neuron information of the corresponding neuron type can be stored in the storage space.
  • Step S904 Obtain the resting potential included in the neuron information corresponding to the neuron type identifier.
  • the storage space corresponding to the neuron type can be found, and then the neuron information of the neuron of this type is read from the storage space, and from Resting potential is obtained from neuronal information.
  • neuron types may include two types, A and B.
  • the resting potential of neurons in type A is -70mv (millivolts) and the release threshold is 0.7V (volts).
  • the resting potential of neurons in type B is -70mv and the release threshold is 0.9V.
  • Storage spaces can be maintained separately for types A and B in the chip. Each storage space can store neuron information of the corresponding neuron type (which may include resting potential and release threshold). For any neuron, if it is determined to be a neuron of type B, the resting potential can be obtained from the storage space corresponding to type B, thereby clarifying that the resting potential of the neuron is -70mv.
  • neuron information of at least one neuron may be pre-stored in the chip according to neuron type.
  • the neuron type identifier corresponding to the current membrane potential and the neuron can be stored in association; in step S806, in response to the current membrane potential being different from the resting potential of the neuron, The resting potential is the same, the current membrane potential is discarded, and the neuron type identifier corresponding to the neuron is stored.
  • neuron information can be associated with the current membrane potential through the neuron type to achieve associative storage.
  • the neuron type identification of the neuron can also be associated with the membrane potential.
  • the potential correlation is stored in the same storage space, which makes it easy to query other neuron information of the neuron when updating the membrane potential of the neuron. While improving storage efficiency and storage space utilization, it can also improve the neuron information query experience.
  • different methods may be used to obtain the current membrane potential of the target neuron depending on whether the membrane potential of the target neuron is stored.
  • FIG. 10 is a schematic flowchart of a method for obtaining current membrane potential according to an embodiment of the present disclosure. As shown in Figure 10, the process of obtaining the current membrane potential may include:
  • Step S1002 in response to storing the membrane potential of the target neuron, determine the stored membrane potential of the target neuron as the current membrane potential of the target neuron.
  • the target neuron can be any neuron among at least one neuron simulated by the chip.
  • each neuron included in the chip can be sequentially determined as a target neuron according to the neuron number.
  • the membrane potential of the target neuron if the membrane potential of the target neuron is stored, it means that the target neuron is in a working state and may have received external stimulation. Therefore, the stored membrane potential of the target neuron can be used as the current membrane potential of the target neuron.
  • Step S1004 in response to the fact that the membrane potential of the target neuron is not stored, determine the resting potential corresponding to the target neuron as the current membrane potential of the target neuron.
  • the membrane potential of the target neuron if the membrane potential of the target neuron is not stored, it means that the target neuron is in a non-working state and may not be stimulated by the outside world. Therefore, the resting potential of the target neuron can be used as the current membrane potential of the target neuron. .
  • neuron information of at least one neuron can be pre-stored in the chip according to neuron type.
  • the neuron type of the target neuron can be obtained, and then based on the neuron type, the neuron information of the target neuron can be queried, and the resting potential included in the neuron information of the target neuron can be used as The current membrane electricity of the target neuron Bit.
  • steps S1002 and S1004 it can be seen from steps S1002 and S1004 that when only the membrane potential of neurons in the working state is recorded, the current membrane potential of the target neuron can still be accurately determined regardless of the working state of the target neuron.
  • the current membrane potential may also be compared with the release threshold of the target neuron. If the current membrane potential reaches the release threshold, the target neuron can be caused to send a pulse signal to the neuron to which it is connected.
  • the neuron type identifier can be stored only once for the same type of neuron, thereby further reducing storage space.
  • the neuron information of at least one neuron can be pre-stored in the chip according to the neuron type; the neuron type identifier of at least one neuron is stored in the chip.
  • the number identification and the current membrane potential of the neuron in response to the current membrane potential being different from the resting potential of the neuron, can be stored, and the stored number identification and the current membrane potential can be compared with the neuron's neuron potential. Metatype identifier associated.
  • the number identification may be a number ID assigned in advance to each neuron included in the chip.
  • each numbered identifier may indicate a unique neuron.
  • a mapping relationship between numbered identifiers and neuron types may be maintained. Through this mapping relationship and the number of the neuron, the neuron type of the neuron can be known. For example, the chip can maintain numbering identifiers 1-100 mapped to type A, and numbering identifiers 101-200 mapped to type B. If the neuron number is 50, it can be determined that the neuron type is A.
  • the number identifier may also reflect the neuron type of the neuron.
  • the neuron type of a neuron can be known by its number identification. For example, if the number of the neuron is B1, it can indicate that the neuron is a type B neuron and the number is 1. For example, if the number of the neuron is A10, it can indicate that the neuron is a type A neuron and the number is 10.
  • step S804 in response to the current membrane potential being different from the resting potential of the neuron, it may be determined whether the type identifier of the neuron is stored in the chip. If the chip stores the type identification of the neuron, the number identification of the neuron and the obtained current membrane potential can be stored in association with the type identification.
  • the chip does not store the type identifier of the neuron, it can first store the type identifier of the neuron, and then store the neuron number identifier and the obtained current membrane potential in association with the type identifier.
  • a section of storage space can be allocated for each type of neuron.
  • it can be determined whether there is a storage space allocated for this type in the chip. If so, associate the number identification of the neuron with the obtained current membrane potential and store it in the storage space corresponding to the type. If not, you can first allocate a storage space for this type of neuron, and then associate the number identification of the neuron with the obtained current membrane potential and store it in the storage space corresponding to this type. In this way, the current membrane potential of neurons of the same type can be stored in the storage space corresponding to the type, so that there is no need to store a neuron type identifier for each neuron, which can further save storage space.
  • the method shown in Figure 11 can be used to obtain the current membrane potential of the target neuron.
  • FIG 11 is a schematic flowchart of a method for obtaining current membrane potential according to an embodiment of the present disclosure. As shown in Figure 11, the process of obtaining the current membrane potential may include:
  • the target neuron may be any neuron in at least one neuron simulated by the chip.
  • each neuron included in the chip can be determined as a target neuron in sequence according to the neuron number.
  • the membrane potential stored in association with the number of the target neuron can be used as the current membrane potential.
  • the target neuron if the number identification of the target neuron is not stored, it means that the target neuron is in a non-working state, that is, it does not receive external stimulation or the stimulation is small. Therefore, the resting potential of the target neuron can be used as the current membrane potential.
  • neuron information of at least one neuron can be pre-stored in the chip according to neuron type.
  • the neuron type of the target neuron can be obtained, and then based on the neuron type, the neuron information of the target neuron can be queried, and the resting potential included in the neuron information of the target neuron can be used as the target.
  • the current membrane potential of the neuron can be used as the target.
  • the current membrane potential of the target neuron can be accurately determined while only storing the type identifier once for the same type of neuron.
  • the current membrane potential can also be compared with the current membrane potential of the target neuron. Release threshold is compared. If the current membrane potential reaches the release threshold, the target neuron can be caused to send a pulse signal to the neuron to which it is connected.
  • the storage space may be divided according to the neural network layer of the neuron, and the neuron information of the neuron may be stored in In the storage space corresponding to the network layer to which the neuron belongs. This facilitates management of the membrane potential of neurons layer by layer.
  • the following is an exemplary description based on the scenario of managing neuron information in a brain chip.
  • a brain-based chip may include one or more computing cores.
  • Each computing core can simulate one or more neurons, or multiple computing cores can simulate one neuron. This is not limited in the embodiments of the present disclosure.
  • the neuron may be a neuron in a spiking neural network.
  • Each neuron can be numbered and the neuron type determined in advance, and the mapping relationship between neuron numbers and neuron types can be stored in the chip.
  • Each neuron type can correspond to some static neuron information (i.e., information that does not change whether the neuron is stimulated or not, which can include resting potential).
  • the chip can store static neuron information by neuron type.
  • the chip can also allocate storage space for storing current membrane potentials by neuron type.
  • step S802 may be performed first. That is, in step S802, the current membrane potential of the neuron can be determined based on the neuron's stimulation information, and its neuron type can be determined based on the neuron number and the aforementioned mapping relationship, and its resting potential can be obtained.
  • step S804 if the membrane potential is different from the resting potential, it means that the neuron is stimulated. It can be determined whether the chip allocates storage space for this type of neuron. If so, the number of the neuron and the membrane potential are associated and stored in allocated storage space. If not, you can first allocate storage space for this type of neuron, and then associate the number of the neuron with the membrane potential and store it in the allocated storage space.
  • step S806 if the membrane potential is the same as the resting potential, it means that the neuron is in a non-working state, and the membrane potential can be discarded without storage.
  • a storage space can be allocated for the same type of neurons, that is, the neurons in the same storage space have the same neuron type, so there is no need to record the neuron model for each neuron. information, which can further save storage space.
  • the same storage space only records the number identification and membrane potential of the neurons in the working state. There is no need to record the relevant information of the neurons in the non-working state, so there is no need to allocate storage space for the neurons in the non-working state. , which can further save storage space.
  • allocating neuron information of the same type of neurons in the same storage space makes it easier to query the membrane potential of neurons.
  • the target neuron When querying the current membrane potential of a brain chip neuron, the target neuron can be determined sequentially according to the neuron number from small to large, and S1102 and S1104 can be executed, so that the current membrane potential of the target neuron can be accurately determined.
  • embodiments of the present disclosure provide an information processing unit.
  • FIG 12 is a block diagram of an information processing unit provided by an embodiment of the present disclosure.
  • the information processing unit 1200 includes:
  • the processing subunit 1201 is configured to perform processing operations on the information to be processed based on the difference information between the information to be processed and the target information of the neuron;
  • the information to be processed includes the weight value of the neuron, the target information corresponding to the weight value includes the weight value interval, and the processing operation includes storage processing of adjusting the storage accuracy of the weight value or storage processing without adjusting the storage accuracy, and/or,
  • the information to be processed includes the membrane potential of the neuron, the target information corresponding to the membrane potential includes the resting potential, and the processing operation includes storing or discarding the membrane potential.
  • the information processing device of the embodiment of the present disclosure may be applied to the storage of weight values.
  • the processing subunit may include a weight storage device, and the weight storage device may include:
  • a dividing module configured to divide multiple weight values between neurons of the current processing core and neurons of the target processing core into multiple target weight groups, where the target weight group includes multiple target weight values
  • the judgment module is configured to judge whether multiple target weight values in the target weight group are within the target weight value range for each target weight group;
  • the storage module is configured to store the multiple target weight values according to the target storage accuracy when the multiple target weight values of the target weight group are within the target weight value range, and the target storage accuracy is lower than the current storage of the target weight value. Accuracy.
  • Figure 13 is a block diagram of a weight storage device provided by an embodiment of the present disclosure, which can be applied to the storage of weight values.
  • the weight storage device 1300 may include:
  • the dividing module 1310 is configured to divide all connection weights between the neurons of the current processing core and the neurons of the target processing core into multiple target weight groups, where the target weight group includes multiple target weight values;
  • the judgment module 1320 is configured to, for each target weight group, judge whether each target weight value in the target weight group is within the target weight value range;
  • the storage module 1330 is configured to store each target weight value according to the target storage accuracy when the judgment module 1320 determines that each target weight value is within the target weight value interval, and the target storage accuracy is lower than the current target weight value. Storage accuracy.
  • Figure 14 is a block diagram of a weight storage device provided by an embodiment of the present disclosure, which can be applied to the storage of weight values.
  • the weight storage device 1400 may include: a determination module 1440 , a dividing module 1410 , a judgment module 1420 and a storage module 1430 .
  • the determination module 1440 is configured to determine the preset weight value interval before the dividing module 1410 divides all weight values between the neurons of the current processing core and the neurons of the target processing core into multiple target weight groups.
  • the division module 1410, the judgment module 1420 and the storage module 1430 please refer to the relevant content of the embodiments of the present disclosure, and the description will not be further elaborated here.
  • the target weight value interval can be determined based on different methods. In some embodiments, the target weight value interval is determined by those skilled in the art based on experience; in some embodiments, the target weight value interval can be determined by analyzing the many-core system. All included weight values are statistically calculated to determine the target weight range.
  • the determination module 1440 may include: an acquisition sub-module 1441 , a statistics sub-module 1442 and a determination sub-module 1443 .
  • the acquisition sub-module 1441 is configured to acquire all weight values contained in the many-core system;
  • the statistics sub-module 1442 is configured to perform normal distribution statistics on all acquired weight values to determine the normality of multiple weight values.
  • the determination sub-module 1443 is configured to determine the weight range in which the distribution probability satisfies the preset probability value in the normal distribution rule as the target weight value range.
  • the weight storage device can be used to implement weight storage.
  • the functional modules of the weight storage device and the interaction process between the functional modules please refer to the relevant information about weight storage in the information processing method of the embodiment of the present disclosure. The content will not be repeated here.
  • the weight storage device when storing the weight values corresponding to the neurons, divides the weight values between neurons into target weight groups, and determines for each target weight group whether it contains Whether the weight values are all within the preset target weight value range belonging to a smaller range, if so, the weight values contained in the target weight group are stored with a target storage precision lower than the current storage precision, thereby reducing the neural network
  • the memory space occupied by the weight storage of the element is reduced, thereby reducing the ineffective occupation of the storage space of the neuromorphic chip and reducing the storage requirements of the neuromorphic chip, thereby conducive to the expanded application of neuromorphic chips.
  • the information processing device of the embodiment of the present disclosure may be applied to the storage of membrane potential.
  • the information processing unit can be applied to a chip, wherein the chip simulates at least one neuron through at least one computing core it includes, and accordingly, the information processing unit includes a neuron information processing device;
  • the neuron information processing device may include:
  • an acquisition module configured to acquire the current membrane potential of at least one neuron
  • a storage module configured to, in response to the current membrane potential being different from the resting potential of the neuron, associate and store the current membrane potential with the neuron information of the neuron; and, in response to the current membrane potential being the same as the resting potential, discard the current membrane potential .
  • Figure 15 is a block diagram of a neuron information processing device provided by an embodiment of the present disclosure, which can be applied to the storage of membrane potential.
  • the neuron information processing device 1500 may include:
  • the acquisition module 1510 is configured to acquire the current membrane potential of at least one neuron
  • the storage module 1520 is configured to, in response to the current membrane potential being different from the resting potential of the neuron, associate and store the current membrane potential with the neuron information of the neuron; and, in response to the current membrane potential being the same as the resting potential, discard the current membrane potential. Potential.
  • the neuron information processing device determines the working state of the neuron by comparing the current membrane potential and the resting potential of the neuron when storing the membrane potential of the neuron, thereby based on the working state of the neuron.
  • the state determines whether to store the current membrane potential. Based on this, the storage pressure caused by storing the membrane potential of neurons in a non-working state can be reduced and the occupation of storage resources can be reduced.
  • the membrane potential of a neuron is equal to its resting potential, it can be said that the neuron is in a non-working state.
  • the neuron is in a working state.
  • the current membrane potential and the neuron information of the neuron can be stored in association to ensure that the membrane potential information of the working neuron is stored, and in response to the current membrane potential being different from the resting potential, The current membrane potential is the same, and the current membrane potential is discarded to reduce the amount of information storage of neurons in the non-working state, so that only the membrane potential of the neurons in the working state can be stored, without the need to store the membrane potential of the neurons in the non-working state. , thus effectively saving storage space.
  • embodiments of the disclosure provide a chip that can be used to perform information processing in any of the embodiments of the disclosure. management method.
  • FIG. 16 is a block diagram of a chip provided by an embodiment of the present disclosure, which can be applied to perform any information processing method according to the embodiment of the present disclosure.
  • the chip 1600 may include at least one computing core, and the computing core may simulate at least one neuron, where:
  • the computing core 1601 is configured to perform processing operations on the information to be processed based on the difference information between the information to be processed and the target information of the neuron;
  • the information to be processed includes the weight value of the neuron, the target information corresponding to the weight value includes the weight value interval, and the processing operation includes storage processing of adjusting the storage accuracy of the weight value or storage processing without adjusting the storage accuracy, and/or,
  • the information to be processed includes the membrane potential of the neuron, the target information corresponding to the membrane potential includes the resting potential, and the processing operation includes storing or discarding the membrane potential.
  • the computing core (which can also be regarded as a processing core) in the chip can be configured to divide multiple weight values between the neurons of the current processing core and the neurons of the target processing core into multiple targets.
  • Weight group the target weight group includes multiple target weight values; for each target weight group, determine whether the multiple target weight values in the target weight group are within the target weight value range; the multiple target weight values in the target weight group are within the target weight value In the case of within the numerical range, multiple target weight values are stored according to the target storage precision, and the target storage precision is lower than the current storage precision of the target weight value.
  • the computing core in the chip may be configured to obtain the current membrane potential of at least one neuron; in response to the current membrane potential being different from the resting potential of the neuron, associate and store the current membrane potential with the neuron's neuron. Metainformation; in response to the current membrane potential being the same as the resting potential, discard the current membrane potential.
  • embodiments of the present disclosure provide an electronic device.
  • Figure 17 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
  • an embodiment of the present disclosure provides an electronic device.
  • the electronic device includes multiple processing cores 1701 and an on-chip network 1702.
  • the multiple processing cores 1701 are connected to the on-chip network 1702, and the on-chip network 1702 is configured to interact Data between multiple processing cores and external data.
  • One or more instructions are stored in one or more processing cores 1701, and the one or more instructions are executed by one or more processing cores 1701, so that the one or more processing cores 1701 can execute the above information processing method.
  • the electronic device may be a brain-like chip, because the brain-like chip can adopt a vectorized calculation method and needs to be loaded into the neural network through an external memory such as a double data rate (Double Data Rate, DDR) synchronous dynamic random access memory. Model weight information and other parameters. Therefore, the operation efficiency of batch processing in the embodiments of the present disclosure is relatively high.
  • DDR Double Data Rate
  • Figure 18 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
  • an embodiment of the present disclosure provides an electronic device, which includes: at least one processor 1801; at least one memory 1802, and one or more I/O interfaces 1803, connected between the processor 1801 and the memory 1802 among them, the memory 1802 stores one or more computer programs that can be executed by at least one processor 1801, and the one or more computer programs are executed by at least one processor 1801, so that at least one processor 1801 can execute the above-mentioned Information processing methods.
  • Embodiments of the present disclosure also provide a computer-readable storage medium with a computer program stored thereon.
  • Figure 19 is a block diagram of a computer-readable medium provided by an embodiment of the present disclosure. Wherein, the computer program implements the above data processing method when executed by the processor/processing core.
  • Computer-readable storage media may be volatile or non-volatile computer-readable storage media.
  • Embodiments of the present disclosure also provide a computer program product, including a computer readable code, or a non-volatile computer readable storage medium carrying the computer readable code, when the computer readable code is stored in a processor of an electronic device When running, the processor in the electronic device executes the above information processing method.
  • Computer storage media includes volatile and non-volatile media implemented in any method or technology for storage of information such as computer readable program instructions, data structures, program modules or other data. lossless, removable and non-removable media.
  • Computer storage media includes, but is not limited to, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, Portable Compact Disk Read Only Memory (CD-ROM), Digital Versatile Disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or can be used to store desired information and can be accessed by a computer any other media.
  • communication media typically embodies computer readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery medium.
  • Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to various computing/processing devices, or to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage on a computer-readable storage medium in the respective computing/processing device .
  • Computer program instructions for performing operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages.
  • the computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through the Internet). connect).
  • LAN local area network
  • WAN wide area network
  • an external computer such as an Internet service provider through the Internet. connect
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA)
  • the electronic circuit can Computer readable program instructions are executed to implement various aspects of the disclosure.
  • the computer program products described herein may be implemented in hardware, software, or a combination thereof.
  • the computer program product can be embodied as a computer storage medium.
  • the computer program product can be embodied as a software product, such as a software development kit (Software Development Kit, SDK) and so on.
  • These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, thereby producing a machine that, when executed by the processor of the computer or other programmable data processing apparatus, , resulting in an apparatus that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium. These instructions cause the computer, programmable data processing device and/or other equipment to work in a specific manner. Therefore, the computer-readable medium storing the instructions includes An article of manufacture that includes instructions that implement aspects of the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other equipment, causing a series of operating steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executed on a computer, other programmable data processing apparatus, or other equipment to implement the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions that contains one or more operable elements for implementing the specified logical function(s).
  • Execute instructions may occur out of the order noted in the figures. For example, two consecutive blocks may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or acts. , or can be implemented using a combination of specialized hardware and computer instructions.
  • Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted in a general illustrative sense only and not for purpose of limitation. In some instances, it will be apparent to those skilled in the art that features, characteristics and/or elements described in connection with a particular embodiment may be used alone, or may be used in conjunction with other embodiments, unless expressly stated otherwise. Features and/or components used in combination. Accordingly, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Neurology (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Complex Calculations (AREA)

Abstract

The present invention relates to an information processing method and unit, a chip, a device, a medium, and a product. The information processing method comprises: on the basis of difference information between information to be processed of a neuron and target information, executing a processing operation of the information to be processed, wherein the information to be processed comprises a weight value of the neuron, target information corresponding to the weight value comprises a weight value interval, the processing operation comprises storage processing that the storage accuracy of the weight value is adjusted or storage processing that the storage accuracy is not adjusted, and/or the information to be processed comprises a membrane potential of the neuron, target information corresponding to the membrane potential comprises a resting potential, and the processing operation comprises storage processing or discard processing on the membrane potential.

Description

信息处理方法及处理单元、芯片、设备、介质、产品Information processing methods and processing units, chips, equipment, media, and products 技术领域Technical field
本公开实施例涉及计算机技术领域,尤其涉及一种信息处理方法及处理单元、芯片、电子设备、计算机可读存储介质、计算机程序产品。Embodiments of the present disclosure relate to the field of computer technology, and in particular, to an information processing method and a processing unit, a chip, an electronic device, a computer-readable storage medium, and a computer program product.
背景技术Background technique
神经网络中可以包括多个神经元,多个神经元中的至少部分神经元之间可以通过突触相互通讯,且至少部分突触之间可以设置相应的权重值。通常情况下,权重值以一个统一的存储精度进行存储,且存储精度一般较高,另外,还可以存储神经元的神经元信息,以供神经元可以根据神经元信息执行处理动作。The neural network may include multiple neurons, at least some of the multiple neurons may communicate with each other through synapses, and corresponding weight values may be set between at least some of the synapses. Normally, the weight values are stored with a unified storage precision, and the storage precision is generally high. In addition, the neuron information of the neurons can also be stored so that the neurons can perform processing actions based on the neuron information.
发明内容Contents of the invention
本公开实施例提供一种信息处理方法及处理单元、芯片、电子设备、计算机可读存储介质、计算机程序产品。Embodiments of the present disclosure provide an information processing method and a processing unit, a chip, an electronic device, a computer-readable storage medium, and a computer program product.
第一方面,本公开实施例提供一种信息处理方法,包括:基于神经元的待处理信息与目标信息之间的差异信息,执行所述待处理信息的处理操作;其中,所述待处理信息包括神经元的权重值,所述权重值对应的目标信息包括权重数值区间,所述处理操作包括对所述权重值调整存储精度的存储处理或者未调整存储精度的存储处理,和/或,所述待处理信息包括神经元的膜电位,所述膜电位对应的目标信息包括静息电位,所述处理操作包括对所述膜电位的存储处理或者丢弃处理。In a first aspect, embodiments of the present disclosure provide an information processing method, including: performing a processing operation on the information to be processed based on the difference information between the information to be processed and the target information of the neuron; wherein the information to be processed is Including the weight value of the neuron, the target information corresponding to the weight value includes a weight value interval, the processing operation includes a storage process of adjusting the storage accuracy of the weight value or a storage process of not adjusting the storage accuracy, and/or, the The information to be processed includes the membrane potential of the neuron, the target information corresponding to the membrane potential includes the resting potential, and the processing operation includes storage processing or discarding processing of the membrane potential.
在一些实施例中,所述信息处理方法可应用于权重存储,所述信息处理方法包括:将当前处理核的神经元与目标处理核的神经元之间的所有权重值划分为多个目标权重组,所述目标权重组包括多个目标权重值;针对每个目标权重组,判断该目标权重组中各所述目标权重值是否均位于目标权重数值区间内;若判断出各所述目标权重值均位于所述目标权重数值区间内,则将各所述目标权重值按照目标存储精度进行存储,所述目标存储精度低于所述目标权重值的当前存储精度。In some embodiments, the information processing method can be applied to weight storage, and the information processing method includes: dividing all weight values between neurons of the current processing core and neurons of the target processing core into multiple target weights. Reorganization, the target weight group includes multiple target weight values; for each target weight group, determine whether each target weight value in the target weight group is located within the target weight value range; if it is determined that each target weight If the values are all within the target weight value range, then each target weight value is stored according to the target storage precision, and the target storage precision is lower than the current storage precision of the target weight value.
在一些实施例中,所述信息处理方法可应用于芯片,所述芯片通过其包括的至少一个计算核模拟至少一个神经元;所述信息处理方法可以包括:获取所述至少一个神经元中每一所述神经元的当前膜电位;响应于所述当前膜电位与所述神经元的静息电位不同,关联存储所述当前膜电位与所述神经元的神经元信息;响应于所述当前膜电位与所述静息电位相同,丢弃所述当前膜电位。In some embodiments, the information processing method may be applied to a chip that simulates at least one neuron through at least one computing core it includes; the information processing method may include: obtaining each of the at least one neuron. a current membrane potential of the neuron; in response to the current membrane potential being different from the resting potential of the neuron, associated storage of the current membrane potential and the neuron information of the neuron; in response to the current The membrane potential is the same as the resting potential, and the current membrane potential is discarded.
第二方面,本公开实施例提供一种信息处理单元,包括:处理子单元,被配置为基于神经元的待处理信息与目标信息之间的差异信息,执行所述待处理信息的处理操作;其中,所述待处理信息包括神经元的权重值,所述权重值对应的目标信息包括权重数值区间,所述处理操作包括对所述权重值调整存储精度的存储处理或者未调整存储精度的存储处理,和/或,所述待处理信息包括神经元的膜电位,所述膜电位对应的目标信息包括静息电位,所述处理操作包括对所述膜电位的存储处理或者丢弃处理。In a second aspect, embodiments of the present disclosure provide an information processing unit, including: a processing subunit configured to perform a processing operation on the information to be processed based on the difference information between the information to be processed and the target information of the neuron; Wherein, the information to be processed includes the weight value of the neuron, the target information corresponding to the weight value includes the weight value interval, and the processing operation includes storage processing of adjusting the storage accuracy of the weight value or storage without adjusting the storage accuracy. processing, and/or, the information to be processed includes the membrane potential of the neuron, the target information corresponding to the membrane potential includes the resting potential, and the processing operation includes storage processing or discarding processing of the membrane potential.
在一些实施例中,处理子单元可以包括权重存储装置,该权重存储装置可以包括:划分模块,被配置为将当前处理核的神经元与目标处理核的神经元之间的所有权重值划分为多个目标权重组,所述目标权重组包括多个目标权重值;判断模块,被配置为针对每个目标权重组,判断该目标权重组中各所述目标权重值是否均位于目标权重数值区间内;存储模块,被配置为在所述判断模块判断出各所述目标权重值均位于所述目标权重数值区间内时,将各所述目标权重值按照目标存储精度进行存储,所述目标存储精度低于所述目标权重值的当前存储精度。In some embodiments, the processing subunit may include a weight storage device, and the weight storage device may include: a dividing module configured to divide all weight values between neurons of the current processing core and neurons of the target processing core into Multiple target weight groups, the target weight group includes multiple target weight values; the judgment module is configured to determine for each target weight group whether each of the target weight values in the target weight group is located in the target weight value range within; a storage module configured to store each target weight value according to the target storage accuracy when the judgment module determines that each target weight value is located within the target weight value interval, and the target storage The accuracy is lower than the currently stored accuracy of the target weight value.
在一些实施例中,处理子单元可以包括神经元信息处理装置,神经元信息处理装置可应用于芯片,所述芯片通过其包括的至少一个计算核模拟至少一个神经元;所述神经元信息处理装置可以包括:获取模块,被配置为获取所述至少一个神经元中每一所述神经元的当前膜电位;存储模块,被配置为响应于所述当前膜电位与所述神经元的静息电位不同,关联存储所述当前膜电位与所述神经元的神经元信息;响应于所述当前膜电位与所述静息电位相同,丢弃所述当前膜电位。In some embodiments, the processing subunit may include a neuron information processing device, which may be applied to a chip that simulates at least one neuron through at least one computing core it includes; the neuron information processing device The device may include: an acquisition module configured to acquire a current membrane potential of each of the at least one neuron; a storage module configured to respond to the current membrane potential and the resting state of the neuron. If the potentials are different, the current membrane potential and the neuron information of the neuron are stored in association; in response to the current membrane potential being the same as the resting potential, the current membrane potential is discarded.
第三方面,本公开实施例提供一种芯片,所述芯片通过其包括的至少一个计算核模拟至少一个神经元;其中,所述计算核,被配置为基于神经元的待处理信息与目标信息之间的差异信息,执行所述待处理信息的处理操作;其中,所述待处理信息包括神经元的权重值,所述权重值对应的目标信息包括权重数值区间,所述处理操作包括对所述权重值调整存储精度的存储处理或者未调整存储精度的存储处理,和/或,所述待处理信息包括神经元的膜电位,所述膜电位对应的目标信息包括静 息电位,所述处理操作包括对所述膜电位的存储处理或者丢弃处理。In a third aspect, embodiments of the present disclosure provide a chip that simulates at least one neuron through at least one computing core it includes; wherein the computing core is configured to be based on the to-be-processed information and target information of the neuron. difference information between them, and perform the processing operation of the information to be processed; wherein the information to be processed includes the weight value of the neuron, the target information corresponding to the weight value includes the weight value interval, and the processing operation includes The storage processing in which the weight value adjusts the storage accuracy or the storage processing in which the storage accuracy is not adjusted, and/or the information to be processed includes the membrane potential of the neuron, and the target information corresponding to the membrane potential includes static information potential, and the processing operation includes storage processing or discarding processing of the membrane potential.
在一些实施例中,所述芯片通过其包括的至少一个计算核模拟至少一个神经元;其中,所述计算核,被配置为获取所述至少一个神经元中每一所述神经元的当前膜电位;响应于所述当前膜电位与所述神经元的静息电位不同,关联存储所述当前膜电位与所述神经元的神经元信息;响应于所述当前膜电位与所述静息电位相同,丢弃所述当前膜电位。In some embodiments, the chip simulates at least one neuron through at least one computing core it includes; wherein the computing core is configured to obtain the current membrane of each of the at least one neuron. potential; in response to the current membrane potential being different from the resting potential of the neuron, correlating and storing the current membrane potential and the neuron information of the neuron; in response to the current membrane potential being different from the resting potential Same, discard the current membrane potential.
第四方面,本公开实施例提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本公开实施例任意一种信息处理方法。In a fourth aspect, embodiments of the present disclosure provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the embodiments of the present disclosure are implemented. Any information processing method.
第五方面,本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现本公开实施例任意一种信息处理方法。In a fifth aspect, embodiments of the present disclosure provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any information processing method of the embodiments of the disclosure is implemented.
第六方面,本公开实施例提供一种计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,其中,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行用于实现本公开实施例任一项所述的信息处理方法。In a sixth aspect, embodiments of the present disclosure provide a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code, wherein when the computer-readable code is in a processor of an electronic device When running, the processor in the electronic device executes the information processing method described in any one of the embodiments of the present disclosure.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of the drawings
图1为本公开实施例提供的一种信息处理方法的流程图。Figure 1 is a flow chart of an information processing method provided by an embodiment of the present disclosure.
图2为本公开实施例提供的一种信息处理方法的流程示意图。FIG. 2 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图3为本公开实施例提供的一种目标权重组的划分方式的示意图。FIG. 3 is a schematic diagram of a method of dividing target weight groups provided by an embodiment of the present disclosure.
图4为本公开实施例提供的一种目标权重组的划分方式的示意图。FIG. 4 is a schematic diagram of a method of dividing target weight groups provided by an embodiment of the present disclosure.
图5为本公开实施例提供的一种目标权重组的划分方式的示意图。FIG. 5 is a schematic diagram of a method of dividing target weight groups provided by an embodiment of the present disclosure.
图6为本公开实施例提供的一种信息处理方法的流程图。Figure 6 is a flow chart of an information processing method provided by an embodiment of the present disclosure.
图7为本公开实施例提供的一种信息处理方法的流程图。Figure 7 is a flow chart of an information processing method provided by an embodiment of the present disclosure.
图8为本公开实施例提供的一种信息处理方法的流程示意图。FIG. 8 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure.
图9为本公开实施例示出的一种获取静息电位的方法示意图。Figure 9 is a schematic diagram of a method for obtaining resting potential according to an embodiment of the present disclosure.
图10为本公开实施例示出的一种获取当前膜电位的方法流程示意图。Figure 10 is a schematic flowchart of a method for obtaining current membrane potential according to an embodiment of the present disclosure.
图11为本公开实施例示出的一种获取当前膜电位的方法流程示意图。Figure 11 is a schematic flowchart of a method for obtaining current membrane potential according to an embodiment of the present disclosure.
图12为本公开实施例提供的一种信息处理单元的组成框图。Figure 12 is a block diagram of an information processing unit provided by an embodiment of the present disclosure.
图13为本公开实施例提供的一种权重存储装置的组成框图。Figure 13 is a block diagram of a weight storage device provided by an embodiment of the present disclosure.
图14为本公开实施例提供的一种权重存储装置的组成框图。Figure 14 is a block diagram of a weight storage device provided by an embodiment of the present disclosure.
图15为本公开实施例提供的一种神经元信息处理装置的组成框图。Figure 15 is a block diagram of a neuron information processing device provided by an embodiment of the present disclosure.
图16为本公开实施例提供的一种芯片的组成框图。Figure 16 is a block diagram of a chip provided by an embodiment of the present disclosure.
图17为本公开实施例提供的一种电子设备的框图。Figure 17 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
图18为本公开实施例提供的一种电子设备的框图。Figure 18 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
图19为本公开实施例提供的一种计算机可读存储介质的框图。Figure 19 is a block diagram of a computer-readable storage medium provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本公开,而非对本公开的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本公开相关的部分而非全部结构。The present disclosure will be further described in detail below in conjunction with the accompanying drawings and examples. It can be understood that the specific embodiments described here are only used to explain the present disclosure, but not to limit the present disclosure. It should also be noted that, for convenience of description, only some but not all structures related to the present disclosure are shown in the drawings.
在相关技术中,可以利用芯片构建神经网络(例如,神经形态芯片),神经网络的多个神经元中的至少部分神经元之间可以通过突触相互通讯,且至少部分突触之间可以设置相应的权重值。In the related art, a chip can be used to construct a neural network (for example, a neuromorphic chip). At least some of the multiple neurons in the neural network can communicate with each other through synapses, and at least some of the synapses can be provided with corresponding weight value.
在该类芯片中,其计算核可以用于模拟神经网络中的至少一个神经元,因此,通常在该类芯片中存储神经元的神经元信息,从而便于神经元根据神经元信息执行处理动作。目前通常采用的方式是将每一个神经元的神经元信息存储起来,便于每一个神经元依据各自的神经元信息做出相应处理。这种对于神经元信息的处理方法可能导致神经元信息过多地占用芯片的存储空间。In this type of chip, its computing core can be used to simulate at least one neuron in the neural network. Therefore, neuron information of the neurons is usually stored in this type of chip, thereby facilitating the neurons to perform processing actions based on the neuron information. The currently commonly used method is to store the neuron information of each neuron, so that each neuron can process accordingly based on its respective neuron information. This method of processing neuron information may cause neuron information to occupy too much storage space on the chip.
另外,神经元的权重值通常也需要进行存储,而且神经元的权重值通常以一个统一的存储精度进行存储,且存储精度一般较高,以满足极大值和极小值的存储。当仅有部分神经元的权重值较小时,为了满足这些较小的权重值的存储需求,可能导致所有权重值都以一个较高的存储精度进行存储,或者,当神经元的所有权重值均较小的情况等,均可能导致对存储空间的过多无效占用,从而 可能对芯片提出更高需求(例如,存储需求),不利于芯片的生产和扩展应用。In addition, the weight values of neurons usually need to be stored, and the weight values of neurons are usually stored with a unified storage precision, and the storage precision is generally high to meet the storage of maximum and minimum values. When only some neurons have small weight values, in order to meet the storage requirements of these small weight values, it may result in all weight values being stored with a higher storage precision, or when all weight values of the neurons are equal In smaller cases, etc., it may lead to excessive and invalid use of storage space, thus It may put higher demands on chips (for example, storage requirements), which is not conducive to the production and expanded application of chips.
有鉴于此,本公开实施例提供一种信息处理方法及处理单元、芯片、电子设备、计算机可读存储介质、计算机程序产品。In view of this, embodiments of the present disclosure provide an information processing method and a processing unit, a chip, an electronic device, a computer-readable storage medium, and a computer program product.
本公开实施例的信息处理方法,基于神经元的待处理信息与目标信息之间的差异信息,执行待处理信息的处理操作;其中,待处理信息包括神经元的权重值,权重值对应的目标信息包括权重数值区间,处理操作包括对所述权重值调整存储精度的存储处理或者未调整存储精度的存储处理,和/或,待处理信息包括神经元的膜电位,膜电位对应的目标信息包括静息电位,处理操作包括对膜电位的存储处理或者丢弃处理。由此可知,在本公开实施例中,一方面,在待处理信息包括权重值的情况下,通过权重值与权重数值区间的差异信息,即可确定是否对权重值的存储精度进行调整,并基于确定后的存储精度执行相应的存储操作,相较于按照统一的高存储精度存储权重值的方式而言,本公开实施例的处理方式可以在必要情况下调整权重值的存储精度,从而可能降低对存储空间的无效占用,相当于提高了对存储资源的利用率;另一方面,在待处理信息包括膜电位的情况下,通过膜电位与静息电位之间的差异信息,即可确定是存储该膜电位还是丢弃该膜电位,相较于存储神经元的所有膜电位而言,本公开实施例的处理方式可以只存储工作状态下的神经元的膜电位,无需存储非工作状态下的神经元的膜电位,可以有效节省存储空间;类似的,在待处理信息包括两者的情况下,分别针对权重值和膜电位执行类似的处理操作即可。The information processing method of the embodiment of the present disclosure performs the processing operation of the information to be processed based on the difference information between the information to be processed and the target information of the neuron; wherein the information to be processed includes the weight value of the neuron and the target corresponding to the weight value. The information includes a weight value interval, and the processing operation includes a storage process that adjusts the storage accuracy of the weight value or a storage process that does not adjust the storage accuracy, and/or the information to be processed includes the membrane potential of the neuron, and the target information corresponding to the membrane potential includes Resting potential, the processing operation includes storage processing or discarding processing of the membrane potential. It can be seen from this that in the embodiment of the present disclosure, on the one hand, when the information to be processed includes a weight value, it can be determined whether to adjust the storage accuracy of the weight value through the difference information between the weight value and the weight value interval, and The corresponding storage operation is performed based on the determined storage accuracy. Compared with the method of storing weight values according to a unified high storage accuracy, the processing method of the embodiment of the present disclosure can adjust the storage accuracy of the weight value if necessary, so that it is possible Reducing the ineffective occupation of storage space is equivalent to improving the utilization of storage resources; on the other hand, when the information to be processed includes membrane potential, it can be determined through the difference information between the membrane potential and the resting potential. Whether to store the membrane potential or discard the membrane potential, compared to storing all membrane potentials of neurons, the processing method of the embodiment of the present disclosure can only store the membrane potential of neurons in the working state, without storing the membrane potential in the non-working state. The membrane potential of the neuron can effectively save storage space; similarly, when the information to be processed includes both, similar processing operations can be performed on the weight value and membrane potential respectively.
本公开实施例的信息处理方法可以由终端设备或服务器等电子设备执行,终端设备可以为车载设备、用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、可穿戴设备等,信息处理方法可以通过处理器调用存储器中存储的计算机可读程序指令的方式来实现。或者,可通过服务器执行本公开实施例的信息处理方法,其中,服务器可以是独立的物理服务器、由多个服务器组成的服务器集群或者能够进行云计算的云服务器。The information processing method of the embodiment of the present disclosure can be executed by electronic equipment such as a terminal device or a server. The terminal device can be a vehicle-mounted device, user equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal Digital assistants (Personal Digital Assistant, PDA), handheld devices, computing devices, wearable devices, etc., the information processing method can be implemented by the processor calling computer-readable program instructions stored in the memory. Alternatively, the information processing method of the embodiment of the present disclosure may be executed through a server, where the server may be an independent physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.
第一方面,本公开实施例提供一种信息处理方法。In a first aspect, embodiments of the present disclosure provide an information processing method.
图1为本公开实施例提供的一种信息处理方法的流程图。参照图1,该信息处理方法包括:Figure 1 is a flow chart of an information processing method provided by an embodiment of the present disclosure. Referring to Figure 1, the information processing method includes:
在步骤S1中,基于神经元的待处理信息与目标信息之间的差异信息,执行待处理信息的处理操作;In step S1, based on the difference information between the neuron's information to be processed and the target information, a processing operation of the information to be processed is performed;
其中,待处理信息包括神经元的权重值,权重值对应的目标信息包括权重数值区间,处理操作包括对所述权重值调整存储精度的存储处理或者未调整存储精度的存储处理,和/或,待处理信息包括神经元的膜电位,膜电位对应的目标信息包括静息电位,处理操作包括对膜电位的存储处理或者丢弃处理。Wherein, the information to be processed includes the weight value of the neuron, the target information corresponding to the weight value includes the weight value interval, and the processing operation includes storage processing of adjusting the storage accuracy of the weight value or storage processing without adjusting the storage accuracy, and/or, The information to be processed includes the membrane potential of the neuron, the target information corresponding to the membrane potential includes the resting potential, and the processing operation includes storing or discarding the membrane potential.
在一些实施例中,本公开实施例的信息处理方法可应用于对权重值的处理。In some embodiments, the information processing method of the embodiment of the present disclosure may be applied to processing weight values.
在一些实施例中,待处理信息可以包括神经元的权重值,对应的目标信息可以包括权重数值区间,该权重数值区间可以是预先确定的、用于表征权重值的取值范围。通过比较权重值和权重取值区间,即可得到关于两者的差异信息,该差异信息可以反映出权重值与权重取值区间的取值关系,例如,差异信息表征权重值位于权重取值区间内,或者,差异信息表征权重值位于权重取值区间之外。相应的,根据差异信息所表征的内容,可以确定是否需要调整权重值的存储精度,并在确定存储精度之后,基于确定的存储精度执行权重值的存储处理即可。其中,确定的存储精度可以是权重值的当前存储精度,也可以是对当前存储精度进行调整后的新的存储精度。In some embodiments, the information to be processed may include the weight value of the neuron, and the corresponding target information may include a weight value interval. The weight value interval may be a predetermined value range used to characterize the weight value. By comparing the weight value and the weight value interval, the difference information about the two can be obtained. This difference information can reflect the value relationship between the weight value and the weight value interval. For example, the difference information indicates that the weight value is located in the weight value interval. within, or the difference information indicates that the weight value is outside the weight value range. Correspondingly, according to the content represented by the difference information, it can be determined whether the storage accuracy of the weight value needs to be adjusted, and after the storage accuracy is determined, the storage processing of the weight value can be performed based on the determined storage accuracy. The determined storage precision may be the current storage precision of the weight value, or it may be a new storage precision after adjusting the current storage precision.
在一些实施例中,可以预先将多个权重值进行分组,得到至少一个权重组(一个权重组中可以包括一个或多个权重值),并以权重组为单位执行相应的处理操作。In some embodiments, multiple weight values can be grouped in advance to obtain at least one weight group (a weight group can include one or more weight values), and corresponding processing operations can be performed in units of weight groups.
示例性地,待处理信息包括至少一个目标权重组的多个目标权重值,目标信息包括目标权重数值区间,差异信息用于表征目标权重组的多个目标权重值与目标权重数值区间的范围关系,处理操作包括以目标权重组为单位执行调整存储精度的多个目标权重值的存储处理,或者,以目标权重组为单位执行未调整存储精度的多个目标权重值的存储处理。Exemplarily, the information to be processed includes multiple target weight values of at least one target weight group, the target information includes a target weight value interval, and the difference information is used to characterize the range relationship between the multiple target weight values of the target weight group and the target weight value interval. , the processing operation includes performing storage processing of multiple target weight values with adjusted storage accuracy in target weight group units, or performing storage processing of multiple target weight values without adjusting storage accuracy in target weight group units.
换言之,待处理信息中可以对应一个或多个目标权重组,各个目标权重组中包括至少一个目标权重值。针对各个目标权重组,通过比较目标权重组中多个目标权重值与目标权重数值区间,即可明确两者的取值范围关系,从而得到相应的差异信息,并可基于差异信息,针对该目标权重组中的多个目标权重值确定是否需要调整存储精度,当确定需要调整存储精度的情况下,以调整后的存储精度存储该目标权重组内的多个目标权重值,当确定不需要调整存储精度的情况下,基于当前存储精度存储该目标权重组内的多个目标权重值。In other words, the information to be processed may correspond to one or more target weight groups, and each target weight group includes at least one target weight value. For each target weight group, by comparing multiple target weight values and target weight value intervals in the target weight group, the relationship between the value ranges of the two can be clarified, thereby obtaining the corresponding difference information, and based on the difference information, the target can be targeted Multiple target weight values in the weight group determine whether the storage accuracy needs to be adjusted. When it is determined that the storage accuracy needs to be adjusted, multiple target weight values in the target weight group are stored with the adjusted storage accuracy. When it is determined that no adjustment is required In the case of storage precision, multiple target weight values within the target weight group are stored based on the current storage precision.
需要说明的是,在相关技术中,在存储神经元的权重值,通常直接基于统一的存储精度进行存 储即可,并不考虑对权重值的存储精度进行调整。在本公开实施例中,通过权重值与权重数值区间的取值关系,可以确定是否需要对权重值的存储精度进行调整,使得在满足使用需求的同时,可以尽量减少对存储空间的无效占用,提高了对存储空间的利用率。It should be noted that in related technologies, when storing the weight values of neurons, they are usually stored directly based on unified storage accuracy. It only needs to be stored, and the adjustment of the storage accuracy of the weight value is not considered. In the embodiment of the present disclosure, through the relationship between the weight value and the weight value interval, it can be determined whether the storage accuracy of the weight value needs to be adjusted, so that the invalid occupation of storage space can be minimized while meeting the usage requirements. Improved storage space utilization.
在一些实施例中,本公开实施例的信息处理方法可应用于对膜电位的处理。In some embodiments, the information processing methods of embodiments of the present disclosure may be applied to processing membrane potential.
在一些实施例中,待处理信息包括神经元的当前膜电位,目标信息包括神经元的静息电位,差异信息用于表征神经元的当前膜电位与神经元的静息电位是否相同,处理操作包括对当前膜电位的存储操作,或者,对当前膜电位的丢弃操作。In some embodiments, the information to be processed includes the current membrane potential of the neuron, the target information includes the resting potential of the neuron, and the difference information is used to characterize whether the current membrane potential of the neuron is the same as the resting potential of the neuron. The processing operation Including the storage operation of the current membrane potential, or the discarding operation of the current membrane potential.
换言之,在得到当前膜电位的情况下,并不直接存储该当前膜电位,而是通过比较当前膜电位与静息电位是否相同,并基于比较结果确定存储该当前膜电位还是丢弃该当前膜电位。In other words, when the current membrane potential is obtained, the current membrane potential is not stored directly, but by comparing whether the current membrane potential is the same as the resting potential, and based on the comparison result, it is determined whether to store the current membrane potential or discard the current membrane potential. .
需要说明的是,在相关技术中,在得到神经元的膜电位之后,通常直接存储该膜电位以备后用。这种处理方式并未考虑神经元的工作状态,而是直接存储膜电位,因此可能需要占用较多的存储空间。在本公开实施例中,考虑到通过神经元的当前膜电位和静息电位可以明确神经元的当前工作状态,并基于此确定是否需要存储当前膜电位或者是否需要丢弃当前膜电位,因此可以在一定程度上减少需要存储的数据量,降低对存储空间的占用量。It should be noted that in related technologies, after obtaining the membrane potential of a neuron, the membrane potential is usually directly stored for later use. This processing method does not take into account the working status of the neuron, but directly stores the membrane potential, so it may require more storage space. In the embodiment of the present disclosure, considering that the current working state of the neuron can be clarified through the current membrane potential and resting potential of the neuron, and based on this, it is determined whether the current membrane potential needs to be stored or whether the current membrane potential needs to be discarded, so it can be Reduce the amount of data that needs to be stored to a certain extent and reduce the amount of storage space occupied.
综上所述,本公开实施例的信息处理方法至少可以应用于以下处理过程:To sum up, the information processing method of the embodiment of the present disclosure can be applied to at least the following processing processes:
第一,可以应用于对神经元的权重值的存储过程,即在存储神经元的权重值之前,先确定是否可以对神经元的存储精度进行调整,并基于调整后的存储精度执行权重值的调整。First, it can be applied to the storage process of the weight value of the neuron, that is, before storing the weight value of the neuron, first determine whether the storage accuracy of the neuron can be adjusted, and perform the weight value based on the adjusted storage accuracy. Adjustment.
第二,可以应用于对神经元的膜电位的存储过程,即针对获得的神经元的膜电位,先基于该膜电位与该神经元的静息电位进行比较,并根据比较结果确定存储或丢弃该膜电位。Second, it can be applied to the storage process of the membrane potential of the neuron, that is, for the obtained membrane potential of the neuron, first compare the membrane potential with the resting potential of the neuron, and determine whether to store or discard it based on the comparison result. the membrane potential.
下面结合图2至图11对本公开实施例的信息处理方法进行展开说明。The information processing method according to the embodiment of the present disclosure will be described below with reference to FIGS. 2 to 11 .
图2为本公开实施例提供的一种信息处理方法的流程示意图,可应用于权重存储。Figure 2 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to weight storage.
参照图2,本公开实施例提供一种信息处理方法,对应的权重存储过程可以包括:Referring to Figure 2, an embodiment of the present disclosure provides an information processing method, and the corresponding weight storage process may include:
步骤S201、将当前处理核的神经元与目标处理核的神经元之间的多个权重值划分为多个目标权重组,目标权重组包括多个目标权重值。Step S201: Divide multiple weight values between the neurons of the current processing core and the neurons of the target processing core into multiple target weight groups, and the target weight group includes multiple target weight values.
在基于神经形态芯片的众核系统中,通常包括多个处理核,并可以在至少部分处理核中加载神经元,且每个处理核中可以加载一个或多个神经元。当前处理核的各神经元与其他处理核的其他神经元的连接关系所对应的权重数据(例如,权重值)通常被预先存储。当神经元发放脉冲时,前继神经元或者后继神经元获取权重数据并根据权重数据进行相关的计算。Many-core systems based on neuromorphic chips usually include multiple processing cores, and neurons can be loaded in at least some of the processing cores, and one or more neurons can be loaded in each processing core. Weight data (for example, weight values) corresponding to the connection relationship between each neuron of the current processing core and other neurons of other processing cores is usually stored in advance. When a neuron fires a pulse, the predecessor neuron or successor neuron obtains the weight data and performs related calculations based on the weight data.
在一些实施例中,在对权重值进行存储时以目标权重组的方式进行存储,目标权重组为通过将当前处理核(当前处理核可以是众核系统中加载有神经元的任意一个处理核)的神经元与目标处理核的神经元之间的多个权重值按照目标权重划分方式进行划分得到,目标权重组内可以包括至少一个目标权重值,也可以包括多个目标权重值。其中,目标权重组可以基于多种目标权重划分方式进行划分,本公开实施例对此不作限制。In some embodiments, when the weight value is stored, it is stored in the form of a target weight group. The target weight group is formed by dividing the current processing core (the current processing core can be any processing core loaded with neurons in the many-core system). ) and the neurons of the target processing core are divided according to the target weight division method. The target weight group may include at least one target weight value, or may include multiple target weight values. Among them, the target weight group can be divided based on a variety of target weight division methods, and the embodiment of the present disclosure does not limit this.
在一些实施例中,将当前处理核的神经元与目标处理核的神经元之间的多个权重值划分为多个目标权重组,包括:获取当前处理核的多个神经元与目标处理核的多个神经元之间的权重值;将当前处理核中的至少一个神经元所对应的权重值,作为一个目标权重组。换言之,可以针对当前处理核中的每个神经元,获取该神经元与目标处理核中的各神经元的权重值,将当前处理核中的一个神经元所对应的所述权重值,作为一个目标权重组。In some embodiments, dividing the multiple weight values between the neurons of the current processing core and the neurons of the target processing core into multiple target weight groups includes: obtaining the multiple neurons of the current processing core and the target processing core. The weight value between multiple neurons; the weight value corresponding to at least one neuron in the current processing core is used as a target weight group. In other words, for each neuron in the current processing core, the weight value of the neuron and each neuron in the target processing core can be obtained, and the weight value corresponding to a neuron in the current processing core can be used as a Target weight grouping.
示例性地,可以将当前处理核的神经元与目标处理核的神经元之间的所有权重值按照目标权重划分方式进行划分,从而得到一个或多个目标权重组。For example, all weight values between the neurons of the current processing core and the neurons of the target processing core can be divided according to the target weight division method, thereby obtaining one or more target weight groups.
示例性地,可以将当前处理核的神经元与目标处理核的神经元之间的至少部分权重值按照目标权重划分方式进行划分,从而得到一个或多个目标权重组。For example, at least part of the weight values between the neurons of the current processing core and the neurons of the target processing core can be divided according to the target weight division method, thereby obtaining one or more target weight groups.
图3为本公开实施例提供的一种目标权重组的划分方式的示意图,图3示例性示出了当前处理核存储的与目标处理核之间的权重值的一种划分方式。如图3所示,目标权重组的划分方式为:针对当前处理核中的每个神经元,获取该神经元与目标处理核中的各神经元的权重值,将当前处理核中的一个神经元所对应的权重值,作为一个目标权重组,即,以当前处理核中一个神经元作为索引,将目标处理核中与该神经元连接的所有权重值作为一个目标权重组。例如,如图3所示,可以以当前处理核中神经元A1作为索引,将目标处理核中所有与神经元A1连接的神经元的权重值划分为一个目标权重组,以将该目标权重组的权重值的存储精度存储为精度1。或者,也可以以当前处理核中神经元A2作为索引,将目标处理核中所有与神经元A2连接的神经元的权重值划分为一个目标权重组,以将该目标权重组的权重值的存储精度存储为精度2。 FIG. 3 is a schematic diagram of a division method of a target weight group provided by an embodiment of the present disclosure. FIG. 3 exemplarily shows a division method of weight values stored between the current processing core and the target processing core. As shown in Figure 3, the target weight group is divided as follows: for each neuron in the current processing core, obtain the weight value of the neuron and each neuron in the target processing core, and combine one neuron in the current processing core The weight value corresponding to the neuron is used as a target weight group, that is, using a neuron in the current processing core as an index, all weight values connected to the neuron in the target processing core are used as a target weight group. For example, as shown in Figure 3, neuron A1 in the current processing core can be used as an index to divide the weight values of all neurons connected to neuron A1 in the target processing core into a target weight group to divide the target weight group into The storage precision of the weight value is stored with precision 1. Alternatively, neuron A2 in the current processing core can also be used as an index to divide the weight values of all neurons connected to neuron A2 in the target processing core into a target weight group to store the weight values of the target weight group. The precision is stored as precision 2.
在一些实施例中,还可以将当前处理核中的多个神经元所对应的权重值,作为一个目标权重组。例如,如图3所示,可以以当前处理核中神经元A3、A4和A5作为索引,将目标处理核中所有与神经元A3~A5连接的神经元的权重值划分为一个目标权重组,以将该目标权重组的权重值的存储精度存储为精度3。In some embodiments, the weight values corresponding to multiple neurons in the current processing core can also be used as a target weight group. For example, as shown in Figure 3, you can use neurons A3, A4, and A5 in the current processing core as indexes to divide the weight values of all neurons connected to neurons A3 to A5 in the target processing core into a target weight group. The storage precision of the weight value of the target weight group is stored as precision 3.
图4为本公开实施例提供的一种目标权重组的划分方式的示意图,图4示例性示出了当前处理核存储的与目标处理核之间的权重值的一种划分方式。如图4所示,目标权重组的划分方式为:获取当前处理核中的各神经元与目标处理核中的至少一个神经元之间的权重值,将当前处理核中各神经元与目标处理核的一个神经元之间的权重值,作为一个目标权重组,即,以目标处理核中一个神经元作为索引,将当前处理核中与目标处理核中的一个神经元连接的各神经元的权重值作为一个目标权重组。例如,如图4所示,可以以目标处理核中神经元B1作为索引,将当前处理核中所有与神经元B1连接的神经元的权重值划分为一个目标权重组,以将该目标权重组的权重值的存储精度存储为精度1。或者,也可以以目标处理核中神经元B3作为索引,将当前处理核中所有与神经元B3连接的神经元的权重值划分为一个目标权重组,以将该目标权重组的权重值的存储精度存储为精度2。FIG. 4 is a schematic diagram of a division method of a target weight group provided by an embodiment of the present disclosure. FIG. 4 exemplarily shows a division method of weight values stored between the current processing core and the target processing core. As shown in Figure 4, the target weight group is divided as follows: obtain the weight value between each neuron in the current processing core and at least one neuron in the target processing core, and combine each neuron in the current processing core with the target processing core. The weight value between one neuron of the core is used as a target weight group, that is, using a neuron in the target processing core as an index, the weight value of each neuron in the current processing core connected to a neuron in the target processing core is The weight value serves as a target weight group. For example, as shown in Figure 4, neuron B1 in the target processing core can be used as an index to divide the weight values of all neurons connected to neuron B1 in the current processing core into a target weight group, so as to divide the target weight group into The storage precision of the weight value is stored with precision 1. Alternatively, neuron B3 in the target processing core can also be used as an index to divide the weight values of all neurons connected to neuron B3 in the current processing core into a target weight group to store the weight values of the target weight group. The precision is stored as precision 2.
在一些实施例中,还可以将目标处理核中的多个神经元所对应的权重值,作为一个目标权重组。如图4所示,可以以目标处理核中神经元B5、B6和B7作为索引,将当前处理核中所有与神经元B5~B7连接的神经元的权重值划分为一个目标权重组,以将该目标权重组的权重值的存储精度存储为精度3。In some embodiments, the weight values corresponding to multiple neurons in the target processing core can also be used as a target weight group. As shown in Figure 4, neurons B5, B6, and B7 in the target processing core can be used as indexes to divide the weight values of all neurons connected to neurons B5 to B7 in the current processing core into a target weight group. The storage precision of the weight value of the target weight group is stored as precision 3.
综上,图3中以源神经元(当前处理核中的神经元)作为索引来确定目标权重组,图4中则以目标神经元(目标处理核中神经元)作为索引来确定目标权重组,二者是基于相同划分原理的两种不同权重组划分形式。另外,需要说明的是,在图3和图4所示的目标权重组划分方式中,目标处理核可以为当前处理核的前继核,或者目标处理核可以为当前处理核的后继处理核,本公开实施例对此不作限制。To sum up, in Figure 3, the source neuron (the neuron in the current processing core) is used as the index to determine the target weight group, and in Figure 4, the target neuron (the neuron in the target processing core) is used as the index to determine the target weight group. , both are two different weighted division forms based on the same division principle. In addition, it should be noted that in the target weight grouping method shown in Figures 3 and 4, the target processing core can be the successor core of the current processing core, or the target processing core can be the successor processing core of the current processing core. The embodiments of the present disclosure do not limit this.
图5为本公开实施例提供的一种目标权重组的划分方式的示意图,图5示例性示出了当前处理核存储的与目标处理核之间的权重值的一种划分方式。如图5所示,目标权重组可以以当前处理核中的部分神经元与目标处理核中的部分神经元之间的权重值作为一个目标权重组。如图5所示,可以将当前处理核中的神经元A1~A3和目标处理核中的神经元B1~B3之间的权重值划分为一个目标权重组,以将该目标权重组的权重存储精度存储为精度1,同理,还可以将当前处理核中的神经元A1~A3和目标处理核中的神经元B4~B7之间的权重值划分为一个目标权重组,以将该目标权重组的权重存储精度存储为精度2。需要说明的是,在该实施例中,多个目标权重组中任意两个目标权重组之间的交集为空集(也可以简称多个目标权重组中任意两个目标权重组之间无交集)。FIG. 5 is a schematic diagram of a division method of a target weight group provided by an embodiment of the present disclosure. FIG. 5 exemplarily shows a division method of weight values stored between the current processing core and the target processing core. As shown in Figure 5, the target weight group can use the weight value between some neurons in the current processing core and some neurons in the target processing core as a target weight group. As shown in Figure 5, the weight values between the neurons A1 to A3 in the current processing core and the neurons B1 to B3 in the target processing core can be divided into a target weight group to store the weight of the target weight group. The accuracy is stored as accuracy 1. In the same way, the weight values between the neurons A1 to A3 in the current processing core and the neurons B4 to B7 in the target processing core can also be divided into a target weight group to divide the target weight. The reorganized weight storage precision is stored as precision 2. It should be noted that in this embodiment, the intersection between any two target weight groups among multiple target weight groups is an empty set (it can also be referred to as no intersection between any two target weight groups among multiple target weight groups). ).
在一些实施例中,在步骤S201中,可通过查询预先存储的当前处理核的当前神经元与目标处理核的目标神经元之间所对应的权重值的方式,获取当前处理核的神经元与目标处理核的神经元之间的多个权重值。例如,可以通过查询用于存储当前处理核中的神经元对应的权重值的突触阵列获取这些权重值。In some embodiments, in step S201, the neuron of the current processing core and the target neuron of the target processing core can be obtained by querying the pre-stored corresponding weight value between the current neuron of the current processing core and the target neuron of the target processing core. Multiple weight values between neurons of the target processing core. For example, these weight values can be obtained by querying the synaptic array used to store the weight values corresponding to the neurons in the current processing core.
步骤S202、针对各个目标权重组,判断目标权重组中多个目标权重值是否位于目标权重数值区间内。Step S202: For each target weight group, determine whether multiple target weight values in the target weight group are within the target weight value range.
在一些实施例中,可以针对每个目标权重组,判断各目标权重值是否均位于目标权重数值区间内。例如,针对每一个目标权重组,判断该目标权重组内的所有目标权重值是否均处于目标权重数值区间中。In some embodiments, for each target weight group, it can be determined whether each target weight value is within the target weight value range. For example, for each target weight group, determine whether all target weight values in the target weight group are within the target weight value range.
在一些实施例中,目标权重数值区间为预设的用于确定目标权重值的存储精度的数值区间,该目标权重数值区间的确定条件可以为:使众核系统内至少有预设比例的权重值属于该目标权重数值区间。示例性地,该预设比例为90%。In some embodiments, the target weight value interval is a preset value interval used to determine the storage accuracy of the target weight value. The determination condition of the target weight value interval may be: having at least a preset proportion of weights in the many-core system The value belongs to the target weight value range. For example, the preset ratio is 90%.
另外,需要说明的是,在一些实施例中,基于本领域中众核系统内权重值的分布特点,确定出的目标权重数值区间通常小于众核系统内所有权重值所归属的数值区间。例如,众核系统内所有权重值所归属的数值区间为[-50,50],而目标权重数值区间可以为[-10,10],其中,目标权重数值区间表示该众核系统内的大部分(例如90%)的权重值都归属于[-10,10]的数值区间。In addition, it should be noted that in some embodiments, based on the distribution characteristics of weight values in many-core systems in this field, the determined target weight value range is usually smaller than the value range to which all weight values in the many-core system belong. For example, the numerical range to which all weight values in the many-core system belong is [-50, 50], and the target weight value range can be [-10, 10], where the target weight value range represents the large number of weights in the many-core system. Some (for example, 90%) of the weight values belong to the numerical interval [-10,10].
在一些实施例中,目标权重数值区间可由本领域技术人员基于经验确定出。In some embodiments, the target weight value interval can be determined based on experience by those skilled in the art.
在一些实施例中,目标权重数值区间可基于对众核系统内所包含的所有权重值进行统计计算确定出。In some embodiments, the target weight value range may be determined based on statistical calculations of all weight values included in the many-core system.
需要说明的是,以上对于目标权重数值区间的确定方式仅是举例说明,本公开实施例对此不作限制。 It should be noted that the above method of determining the target weight value interval is only an example, and the embodiment of the present disclosure does not limit this.
在步骤S202中,针对各个目标权重组,若判断出目标权重组的多个目标权重值均位于目标权重数值区间内,则说明该目标权重组内各目标权重值均属于较小的数值区间,从而可能无需使用较高的存储精度进行存储,因此,可以执行步骤S203,以将目标权重组的多个目标权重值以低于当前存储精度的存储精度进行存储,从而减少对存储空间的占用;而当判断出目标权重组中多个目标权重值中存在至少一个目标权重值位于目标权重数值区间之外,则说明该目标权重组的多个目标权重值中可能存在极大值或极小值,因此,仍然需要使用较高的存储精度进行存储,才能将该目标权重组的所有目标权重值进行完整存储,此时保持该目标权重组的各目标权重值的当前存储精度不变,即使得该目标权重组的各目标权重值继续以当前存储精度进行存储。In step S202, for each target weight group, if it is determined that multiple target weight values of the target weight group are located within the target weight numerical interval, it means that each target weight value in the target weight group belongs to a smaller numerical interval. Therefore, there may be no need to use a higher storage precision for storage. Therefore, step S203 can be performed to store multiple target weight values of the target weight group with a storage precision lower than the current storage precision, thereby reducing the occupation of storage space; When it is determined that at least one target weight value among the multiple target weight values in the target weight group is outside the target weight value range, it means that there may be a maximum value or a minimum value among the multiple target weight values in the target weight group. , therefore, it is still necessary to use a higher storage precision for storage to completely store all the target weight values of the target weight group. At this time, the current storage accuracy of each target weight value of the target weight group remains unchanged, that is, Each target weight value of the target weight group continues to be stored with the current storage precision.
步骤S203、在目标权重组的多个目标权重值位于目标权重数值区间内的情况下,将多个目标权重值按照目标存储精度进行存储,目标存储精度低于目标权重值的当前存储精度。Step S203: When the multiple target weight values of the target weight group are within the target weight value range, store the multiple target weight values according to the target storage precision, which is lower than the current storage precision of the target weight value.
步骤S204、在目标权重组的多个目标权重值中存在至少一个目标权重值位于目标权重数值区间之外的情况下,保持目标权重组的多个目标权重值的当前存储精度不变。Step S204: If at least one target weight value among the multiple target weight values in the target weight group is outside the target weight value range, keep the current storage accuracy of the multiple target weight values in the target weight group unchanged.
在一些实施例中,目标存储精度可基于目标权重数值区间确定出,目标存储精度应至少能满足目标权重数值区间所包含的数值对于存储字节的需求。例如,当目标权重数值区间所包含的数值最大不超过127,而最小不小于-128时,可设置目标存储精度为8位整型(int8)。In some embodiments, the target storage accuracy can be determined based on the target weight value interval, and the target storage accuracy should at least meet the storage byte requirements for the values included in the target weight value interval. For example, when the maximum value contained in the target weight value interval does not exceed 127 and the minimum value is not less than -128, the target storage precision can be set to an 8-bit integer (int8).
另外,需要说明的是,本公开实施例中,目标存储精度是低于该目标权重值的当前存储精度的,这是由于目标权重数值区间相较于众核系统内所有权重值所归属的数值区间有所缩小,因此,目标存储精度必然需要低于该目标权重值的当前存储精度。In addition, it should be noted that in the embodiment of the present disclosure, the target storage accuracy is lower than the current storage accuracy of the target weight value. This is because the target weight value range is compared with the values to which all weight values in the many-core system belong. The interval has been reduced, so the target storage accuracy must be lower than the current storage accuracy of the target weight value.
在一些实施例中,为了尽量缓解权重值在后续的变化过程中受到存储精度的影响,可以使目标存储精度的类型与当前存储精度的类型保持相同。例如,若当前存储精度为浮点型,则目标存储精度的类型仍然可以为浮点型。其中,当前存储精度为可以为浮点型存储精度或者整型存储精度。In some embodiments, in order to minimize the impact of storage precision on the weight value during subsequent changes, the type of the target storage precision can be kept the same as the type of the current storage precision. For example, if the current storage precision is floating point, the type of the target storage precision can still be floating point. Among them, the current storage precision can be floating point storage precision or integer storage precision.
在本公开实施例中,在对神经元对应的权重值进行存储时,将神经元之间的权重值划分为目标权重组,针对每个目标权重组判断其权重值是否均处于预设的属于较小范畴的目标权重数值区间内,若是,则将权重值以低于当前存储的存储精度进行存储,从而缩减了神经元的权重存储所占用的存储空间,进而减少了对神经形态芯片的存储空间的无效占用,降低了神经形态芯片的存储需求,从而有利于神经形态芯片的扩展应用。In the embodiment of the present disclosure, when storing the weight values corresponding to the neurons, the weight values between the neurons are divided into target weight groups, and for each target weight group, it is determined whether the weight values are all within the preset category. Within a smaller range of target weight value range, if so, the weight value will be stored with a storage precision lower than the current storage, thereby reducing the storage space occupied by the weight storage of the neuron, thereby reducing the storage of the neuromorphic chip. The ineffective occupation of space reduces the storage requirements of neuromorphic chips, which is conducive to the expanded application of neuromorphic chips.
在一些实施例中,在对目标权重值进行存储时可基于数据包的形式进行存储。In some embodiments, the target weight value may be stored based on the form of a data packet.
在一些实施例中,目标权重组可以以数据包形式进行存储。In some embodiments, the target weight set may be stored in the form of data packets.
在一些实施例中,数据包的格式如下:
In some embodiments, the format of the data packet is as follows:
其中,cid表示目标处理核的标识信息;startaddr表示目标处理核内与当前处理核内的一个神经元连接的起始目标神经元的地址;len表示在该目标处理核内自连接的起始目标神经元的地址起连续连接的目标神经元的数量;acc表示目标存储精度;weight表示各目标权重值,且各目标权重值与基于字段startaddr和len所确定出的目标神经元一一对应。Among them, cid represents the identification information of the target processing core; startaddr represents the address of the starting target neuron in the target processing core that is connected to a neuron in the current processing core; len represents the starting target of self-connection in the target processing core. The address of the neuron starts from the number of continuously connected target neurons; acc represents the target storage accuracy; weight represents the weight value of each target, and each target weight value corresponds to the target neuron determined based on the fields startaddr and len.
需要说明的是,在一些实施例中,在目标神经元在目标处理核内的地址是非连续的情况下,可将各目标神经元之间所间隔的神经元的权重值设置为零,并对应存储在参数weight中。It should be noted that in some embodiments, when the addresses of the target neurons in the target processing core are discontinuous, the weight values of the neurons spaced between each target neuron can be set to zero, and the corresponding Stored in parameter weight.
在一些实施例中,若当前处理核内的一个神经元仅与目标处理核内的一个目标神经元连接,则数据包的格式可以为:
In some embodiments, if a neuron in the current processing core is only connected to one target neuron in the target processing core, the format of the data packet may be:
其中,cid表示目标处理核的标识信息;addr表示目标神经元的地址,acc表示目标存储精度;weight表示目标权重值。Among them, cid represents the identification information of the target processing core; addr represents the address of the target neuron, acc represents the target storage accuracy; weight represents the target weight value.
在一些实施例中,一个神经元对应有至少一个数据包,每个数据包对应于一个与该神经元连接的目标处理核,且每个数据包可以具有各自的存储精度。In some embodiments, one neuron corresponds to at least one data packet, each data packet corresponds to a target processing core connected to the neuron, and each data packet can have its own storage precision.
在一些实施例中,为进一步降低对存储空间的占用(例如,降低对神经形态芯片的存储空间的占用),可将当前处理核内的一个神经元所对应的多个数据包按照目标存储精度进行分类存储,而不再在每个数据包中对存储精度进行标示,即将目标存储精度相同的数据包存储为一个大数据包,如下所示,大数据包的格式可以为:
In some embodiments, in order to further reduce the occupation of storage space (for example, to reduce the occupation of storage space of a neuromorphic chip), multiple data packets corresponding to one neuron in the current processing core can be stored according to the target accuracy. Classify storage instead of marking the storage accuracy in each data packet. That is, data packets with the same target storage accuracy are stored as one large data packet, as shown below. The format of the large data packet can be:
其中,acc表示目标存储精度,每一组addr和weight代表如上所述的当前处理核内一个神经元所连接的一个目标处理核对应的数据包,其中,addr表示目标神经元的地址,weight表示目标权重值。Among them, acc represents the target storage accuracy, and each set of addr and weight represents the data packet corresponding to a target processing core connected to a neuron in the current processing core as mentioned above. Among them, addr represents the address of the target neuron, and weight represents Target weight value.
例如,一个神经元对应的所有数据包中包含1000个32位浮点型(fp32)的数据包和10个16位浮点型(fp16)的数据包,则可以将1000个32位浮点型的数据包存储在一起,并统一标示存储精度为fp32,将10个16位浮点型的数据包统一存储在一起,并统一标示存储精度为fp16。这种存储方式由于共用了存储精度相关字段,因此可进一步降低对神经形态芯片的存储空间的占用。For example, if all data packets corresponding to a neuron include 1000 32-bit floating point (fp32) data packets and 10 16-bit floating point (fp16) data packets, then 1000 32-bit floating point type (fp16) data packets can be The data packets are stored together, and the storage precision is uniformly marked as fp32. The 10 16-bit floating point data packets are stored together, and the storage precision is uniformly marked as fp16. This storage method can further reduce the storage space occupied by neuromorphic chips because it shares storage accuracy related fields.
需要说明的是,本公开实施例中,若目标权重组是以目标处理核内的目标神经元作为索引进行划分,则上述数据包内与目标处理核地址相关的信息可以表示为当前处理核内对应的地址相关信息。例如,cid表示当前处理核的标识信息,addr表示当前处理核内的神经元的地址,startaddr表示当前处理核内与目标处理核内的一个神经元连接的起始神经元的地址,等等。It should be noted that in the embodiment of the present disclosure, if the target weight group is divided using the target neuron in the target processing core as an index, then the information related to the target processing core address in the above data packet can be expressed as the target neuron in the current processing core. Corresponding address related information. For example, cid represents the identification information of the current processing core, addr represents the address of the neuron in the current processing core, startaddr represents the address of the starting neuron in the current processing core that is connected to a neuron in the target processing core, and so on.
本公开实施例中,除了上述以数据包的形式对目标权重值进行存储外,还可基于阵列的形式对目标权重值进行存储,本公开实施例对此不作限制。In the embodiment of the present disclosure, in addition to the above-mentioned storage of the target weight value in the form of data packets, the target weight value can also be stored in the form of an array, which is not limited in the embodiment of the present disclosure.
图6为本公开实施例提供的一种信息处理方法的流程图,可应用于权重存储。Figure 6 is a flow chart of an information processing method provided by an embodiment of the present disclosure, which can be applied to weight storage.
参照图6,在步骤S201之前,该信息处理方法还可以包括:Referring to Figure 6, before step S201, the information processing method may also include:
步骤S200、确定出目标权重数值区间。Step S200: Determine the target weight value interval.
本公开实施例中,目标权重数值区间可基于不同的方式确定出。In the embodiment of the present disclosure, the target weight value range can be determined based on different methods.
在一些实施例中,目标权重数值区间可以由本领域技术人员基于经验确定出。In some embodiments, the target weight value range can be determined based on experience by those skilled in the art.
在一些实施例中,可通过对众核系统中所包含的所有权重值进行统计计算来确定出目标权重数值区间。In some embodiments, the target weight value range may be determined by performing statistical calculations on all weight values included in the many-core system.
关于步骤S201至S204可以参见本公开实施例的相关内容,在此不再展开描述。Regarding steps S201 to S204, please refer to the relevant content of the embodiments of the present disclosure, and the description will not be further elaborated here.
在一些实施例中,确定出目标权重数值区间,可以包括:获取众核系统中所包含的多个权重值(例如,该多个权重值可以是众核系统所包括的所有权重值,也可以是其中的至少部分权重值);对所获取的多个权重值进行正态分布统计,确定出多个权重值的正态分布规律;将正态分布规律中分布概率满足预设概率值的权重范围,确定为目标权重数值区间。In some embodiments, determining the target weight value range may include: obtaining multiple weight values included in the many-core system (for example, the multiple weight values may be all weight values included in the many-core system, or may be is at least part of the weight values); perform normal distribution statistics on the multiple weight values obtained, and determine the normal distribution rules of multiple weight values; calculate the weights whose distribution probability in the normal distribution rule satisfies the preset probability value The range is determined as the target weight value range.
图7为本公开实施例提供的一种信息处理方法的流程图,其用于描述权重存储过程中的部分步骤。Figure 7 is a flow chart of an information processing method provided by an embodiment of the present disclosure, which is used to describe some steps in the weight storage process.
参照图7,在本公开实施例的权重存储过程中,步骤S200,确定出目标权重数值区间的步骤,可以包括:Referring to Figure 7, in the weight storage process of the embodiment of the present disclosure, step S200, the step of determining the target weight value interval, may include:
步骤S2001、获取众核系统所包含的所有权重值。Step S2001: Obtain all weight values included in the many-core system.
步骤S2002、对所获取的所有权重值进行正态分布统计以确定出权重值的正态分布规律。Step S2002: Perform normal distribution statistics on all obtained weight values to determine the normal distribution rule of the weight values.
步骤S2003、将正态分布规律中分布概率满足预设概率值的权重范围,确定为目标权重数值区间。Step S2003: Determine the weight range in which the distribution probability in the normal distribution law satisfies the preset probability value as the target weight range.
在一些实施例中,众核系统中所有权重值的分布满足正态分布规律,因此,对众核系统所包含的所有权重值进行正态分布统计即可确定出众核系统中所有权重值的正态分布规律,进而根据得到的正态分布规律确定出目标权重数值区间。In some embodiments, the distribution of all weight values in the many-core system satisfies the normal distribution law. Therefore, the normal distribution statistics of all weight values included in the many-core system can be used to determine the normal distribution of all weight values in the many-core system. According to the normal distribution law, the target weight value range is determined based on the obtained normal distribution law.
示例性地,在步骤S2002中,对所获取的众核系统中的所有权重值进行正态分布统计,得到权重值的正态分布规律,该正态分布规律包括正态分布的期望值和标准差;在步骤S2003中,基于确定出的期望值和标准差,通过查询标准正态分布表确定出权重值的分布概率满足预设概率值对应的权重范围,将该权重范围确定为目标权重数值区间,其中,权重值的分布概率满足预设概率值对应的权重范围是指每个权重值将以不低于该预设概率值的几率位于该权重范围内。Illustratively, in step S2002, normal distribution statistics are performed on all weight values obtained in the many-core system to obtain a normal distribution rule of the weight values. The normal distribution rule includes the expected value and standard deviation of the normal distribution. ; In step S2003, based on the determined expected value and standard deviation, it is determined by querying the standard normal distribution table that the distribution probability of the weight value satisfies the weight range corresponding to the preset probability value, and the weight range is determined as the target weight value interval, Among them, the distribution probability of the weight value satisfies the weight range corresponding to the preset probability value, which means that each weight value will be located in the weight range with a probability of not less than the preset probability value.
例如,通过对众核系统中所有的权重值进行统计可以计算确定出其满足正态分布的正态分布规律中的期望值为μ=12,标准差为σ=2,预设概率值设置为90%,通过查询标准正态分布表确定出当权重值的分布概率要满足90%时对应的权重范围为(μ-2σ,μ+2σ),由此,可确定出目标权重数值区间为(8,16)。For example, by counting all the weight values in the many-core system, it can be calculated and determined that the expected value in the normal distribution law that satisfies the normal distribution is μ = 12, the standard deviation is σ = 2, and the preset probability value is set to 90 %, by querying the standard normal distribution table, it is determined that when the distribution probability of the weight value satisfies 90%, the corresponding weight range is (μ-2σ, μ+2σ). From this, it can be determined that the target weight value range is (8 ,16).
图8为本公开实施例提供的一种信息处理方法的流程示意图,可应用于膜电位存储。Figure 8 is a schematic flowchart of an information processing method provided by an embodiment of the present disclosure, which can be applied to membrane potential storage.
参照图8,本公开实施例提供一种信息处理方法,对应的膜电位存储过程可以包括:Referring to Figure 8, an embodiment of the present disclosure provides an information processing method, and the corresponding membrane potential storage process may include:
步骤S802,获取至少一个神经元的当前膜电位。Step S802: Obtain the current membrane potential of at least one neuron.
在一些实施例中,获取至少一个神经元的当前膜电位可以是获取一个神经元的当前膜电位,也可以是获取多个神经元的当前膜电位,本公开实施例对此不作限制。In some embodiments, obtaining the current membrane potential of at least one neuron may be obtaining the current membrane potential of one neuron, or obtaining the current membrane potential of multiple neurons, which is not limited in the embodiments of the present disclosure.
在一些实施例中,该膜电位存储过程可以应用于芯片,该芯片可以通过其包括的至少一个计算 核模拟至少一个神经元。相应的,获取至少一个神经元的当前膜电位,可以是针对上述计算核,获取该至少一个神经元中每一个神经元的当前膜电位。或者,获取至少一个神经元的当前膜电位,也可以是获取多个计算核对应的多个神经元的当前膜电位,本公开实施例对此不作限制。In some embodiments, the membrane potential storage process can be applied to a chip, which can calculate The core simulates at least one neuron. Correspondingly, obtaining the current membrane potential of at least one neuron may be to obtain the current membrane potential of each neuron in the at least one neuron for the above calculation core. Alternatively, the current membrane potential of at least one neuron may be obtained, or the current membrane potential of multiple neurons corresponding to multiple computing cores may be obtained. The embodiments of the present disclosure are not limited to this.
在一些实施例中,当前膜电位,可以是指神经元受到其它神经元刺激产生的电压值。其中,神经元可以为人工神经网络或脉冲神经网络中的神经元。In some embodiments, the current membrane potential may refer to the voltage value generated by a neuron being stimulated by other neurons. The neurons may be neurons in an artificial neural network or a spiking neural network.
在一些实施例中,当前膜电位,可以是指根据与神经元连接的其它神经元发出的刺激信号计算得到的该神经元的当前膜电位。In some embodiments, the current membrane potential may refer to the current membrane potential of the neuron calculated based on stimulation signals emitted by other neurons connected to the neuron.
在一些实施例中,获取当前膜电位的过程可以包括:获取当前时刻神经元受到的多路刺激信号,并根据每路刺激信号对应的权重,对多路刺激信号进行加权处理得到输入电位,在输入电位的基础上结合神经元的泄漏电压以及上一时刻的膜电位,求得神经元的当前膜电位。In some embodiments, the process of obtaining the current membrane potential may include: obtaining multiple stimulation signals received by the neuron at the current moment, and weighting the multiple stimulation signals according to the weight corresponding to each stimulation signal to obtain the input potential. Based on the input potential, the current membrane potential of the neuron is obtained by combining the leakage voltage of the neuron and the membrane potential at the previous moment.
例如,神经元A与神经元B、C、D分别通过突触1,2,3连接。在获取神经元A对应的膜电位时,可以根据为突触1,2,3设置的权重,对神经元B、C、D当前向神经元A发出的刺激信号(也可以是对刺激信号进行处理后的信号)进行加权求和,得到关于神经元A的输入电位。然后将该输入电位与神经元A在上一时刻的膜电位求和,并与神经元A的泄漏电位求差,从而得到神经元A对应的膜电位。For example, neuron A is connected to neurons B, C, and D through synapses 1, 2, and 3 respectively. When obtaining the membrane potential corresponding to neuron A, the stimulation signals currently sent by neurons B, C, and D to neuron A can be calculated based on the weights set for synapses 1, 2, and 3 (it can also be performed on the stimulation signals). The processed signals) are weighted and summed to obtain the input potential of neuron A. Then the input potential is summed with the membrane potential of neuron A at the previous moment, and the difference is calculated with the leakage potential of neuron A to obtain the membrane potential corresponding to neuron A.
步骤S804,响应于当前膜电位与神经元的静息电位不同,关联存储当前膜电位与神经元的神经元信息。Step S804: In response to the current membrane potential being different from the resting potential of the neuron, associate and store the current membrane potential and the neuron information of the neuron.
在一些实施例中,静息电位,指神经元未受到其它神经元刺激时的电位。如果神经元的膜电位等于静息电位,可以说明该神经元并未受到刺激,即处于非工作状态;如果神经元的膜电位不等于静息电位,可以说明该神经元受到了刺激,即处于工作状态。In some embodiments, the resting potential refers to the potential of a neuron when it is not stimulated by other neurons. If the membrane potential of a neuron is equal to the resting potential, it means that the neuron has not been stimulated, that is, it is in a non-working state; if the membrane potential of the neuron is not equal to the resting potential, it means that the neuron has been stimulated, that is, it is in a non-working state. working status.
在一些实施例中,芯片可以预先分配一块存储空间,用于存储该芯片包括的多个神经元的神经元信息(例如,用于存储该芯片所包括的所有神经元的神经元信息)。其中,神经元信息可以包括神经元的静息电位,释放阈值信息等。In some embodiments, the chip may pre-allocate a storage space for storing neuron information of multiple neurons included in the chip (for example, for storing neuron information of all neurons included in the chip). Among them, the neuron information can include the resting potential of the neuron, release threshold information, etc.
在一些实施例中,获取静息电位的过程可以包括:从该预先分配的存储空间中,获取与神经元对应的神经元信息,并从中获取神经元的静息电位。In some embodiments, the process of obtaining the resting potential may include: obtaining neuron information corresponding to the neuron from the pre-allocated storage space, and obtaining the resting potential of the neuron therefrom.
在一些实施例中,神经元信息包括以下至少一项:释放阈值、泄漏值、静息电位。以上对于神经元信息仅是举例说明,本公开实施例对此不作限制。In some embodiments, the neuron information includes at least one of the following: release threshold, leakage value, resting potential. The above examples of neuron information are only examples, and the embodiments of the present disclosure do not limit this.
在一些实施例中,神经元信息可以预先存储在芯片中,相应的,在步骤S804中,可以通过将指示神经元信息的标识,与获取的当前膜电位共同存储的方式实现关联存储。In some embodiments, the neuron information can be pre-stored in the chip. Correspondingly, in step S804, associated storage can be achieved by co-storing the identifier indicating the neuron information and the obtained current membrane potential.
例如,标识可以是指示神经元信息的存储地址,将该存储地址与获取的当前膜电位共同存储可以实现关联存储。For example, the identifier can be a storage address indicating neuron information, and associative storage can be achieved by storing the storage address together with the obtained current membrane potential.
例如,标识可以是神经元类型编号。该类型编号对应的神经元具有相同的神经元信息。将该神经元类型编号与获取的当前膜电位共同存储也可以实现关联存储。其中,可以基于神经元的静息电位、发放阈值等信息将神经元划分为相应的神经元类型,并可使用神经元类型编号对各个神经元类型进行标识。For example, the identifier could be a neuron type number. Neurons corresponding to this type number have the same neuron information. Associative storage can also be achieved by storing the neuron type number together with the obtained current membrane potential. Among them, neurons can be divided into corresponding neuron types based on the resting potential, firing threshold and other information of the neuron, and each neuron type can be identified using the neuron type number.
在一些实施例中,可以预先对芯片模拟的神经元进行编号。相应的,在步骤S804中,可以基于预先设置的神经元编号标识,顺序关联存储当前膜电位与神经元的神经元信息。In some embodiments, the neurons simulated by the chip can be numbered in advance. Correspondingly, in step S804, the current membrane potential and the neuron information of the neuron can be sequentially stored in association based on the preset neuron number identifier.
例如,芯片可以模拟编号为1至100的100个神经元,并可以采用从小到大的编号方式依次针对各神经元关联存储当前膜电位与该神经元的神经元信息。For example, the chip can simulate 100 neurons numbered from 1 to 100, and can store the current membrane potential and the neuron information of each neuron in sequence in order from small to large.
步骤S806,响应于当前膜电位与静息电位相同,丢弃当前膜电位。Step S806, in response to the current membrane potential being the same as the resting potential, discard the current membrane potential.
在一些实施例中,在获取神经元的当前膜电位与静息电位后,可以比较二者的大小,如果二者不相同,则可以说明神经元受到其它神经元刺激,神经元处于工作状态,可以关联存储该膜电位,如果二者相同,则可以说明神经元未受到其它神经元刺激,神经元处于非工作状态,可以丢弃该膜电位。In some embodiments, after obtaining the current membrane potential and the resting potential of the neuron, the two sizes can be compared. If the two are different, it can mean that the neuron is stimulated by other neurons and the neuron is in a working state. The membrane potential can be stored in association. If the two are the same, it means that the neuron is not stimulated by other neurons and the neuron is in a non-working state, and the membrane potential can be discarded.
例如,在稀疏网络中,大部分的神经元通常处于非工作状态,这部分神经元不会受到其它神经元的刺激,只有少部分的神经元处于工作状态,通过本公开实施例的信息处理方法执行相关处理之后,只会记录少部分神经元的膜电位(即处于工作状态的神经元的膜电位),大部分神经元的膜电位被丢弃,因此可以大量节省存储空间。For example, in a sparse network, most of the neurons are usually in a non-working state. These neurons are not stimulated by other neurons, and only a small number of neurons are in a working state. Through the information processing method of the embodiment of the present disclosure, After performing relevant processing, only the membrane potential of a small number of neurons (that is, the membrane potential of neurons in working state) will be recorded, and the membrane potential of most neurons will be discarded, thus saving a lot of storage space.
综上,由于神经元的膜电位等于其静息电位,可以说明该神经元处于非工作状态,膜电位不等于静息电位,可以说明神经元处于工作状态,因此,在本公开实施例中,通过响应于当前膜电位与神经元的静息电位不同,关联存储当前膜电位与神经元的神经元信息,并且响应于当前膜电位与静 息电位相同,丢弃当前膜电位,可以只存储工作状态下的神经元的膜电位,无需存储非工作状态下的神经元的膜电位,从而能够节省存储空间。In summary, since the membrane potential of a neuron is equal to its resting potential, it can mean that the neuron is in a non-working state. The membrane potential is not equal to the resting potential, which can mean that the neuron is in a working state. Therefore, in the embodiment of the present disclosure, By responding to the current membrane potential being different from the resting potential of the neuron, the neuronal information of the current membrane potential and the neuron is stored in association, and in response to the current membrane potential being different from the resting potential of the neuron, If the current membrane potential is discarded, only the membrane potential of the neuron in the working state can be stored, and there is no need to store the membrane potential of the neuron in the non-working state, thus saving storage space.
在一些实施例中,同一类型的神经元具有至少部分相同的神经元信息,芯片针对同一类型的神经元具有的相同的神经元信息可以只存储一份,无需针对每一个神经元都存储相同的神经元信息(例如,相同的静息电位),从而可以进一步节省存储空间。需要说明的是,上述只存储一份的神经元信息,通常不会因为神经元是否受到外界刺激发生变化,以此保障共用该份神经元信息的任意一个神经元,不会因为其本身受到的刺激而导致该共用神经元信息发生变化或者该神经元无法使用共用神经元信息。例如,该类神经元信息可以包括静息电位,释放阈值,泄漏值等中的任意一种或多种。In some embodiments, neurons of the same type have at least part of the same neuron information. The chip can only store one copy of the same neuron information for neurons of the same type, and there is no need to store the same neuron information for each neuron. Neuronal information (e.g., the same resting potential), thereby further saving storage space. It should be noted that the above-mentioned storage of only one copy of neuron information usually does not change depending on whether the neuron is subject to external stimulation. This ensures that any neuron that shares this copy of neuron information will not be affected by any external stimulus. Stimulation causes changes in the shared neuron information or the neuron is unable to use the shared neuron information. For example, this type of neuron information may include any one or more of resting potential, release threshold, leakage value, etc.
在一些实施例中,可以将至少一个神经元的神经元信息按照神经元类型预先存储于芯片内。In some embodiments, neuron information of at least one neuron can be pre-stored in the chip according to neuron type.
图9为本公开实施例示出的一种获取静息电位的方法示意图。如图9所示,获取静息电位的过程可以包括:Figure 9 is a schematic diagram of a method for obtaining resting potential according to an embodiment of the present disclosure. As shown in Figure 9, the process of obtaining the resting potential can include:
步骤S902,获取神经元的神经元类型标识。Step S902: Obtain the neuron type identifier of the neuron.
在一些实施例中,芯片可以包括多种类型的神经元。神经元类型标识,可以是针对该芯片的每一神经元预先维护的类型标识。In some embodiments, a chip may include multiple types of neurons. The neuron type identifier may be a type identifier maintained in advance for each neuron of the chip.
在一些实施例中,可以在芯片中预先为每一神经元类型分配一段存储空间,在该存储空间中可以存储相应神经元类型的神经元信息。In some embodiments, a storage space can be pre-allocated for each neuron type in the chip, and neuron information of the corresponding neuron type can be stored in the storage space.
步骤S904,获取与神经元类型标识对应的神经元信息所包括的静息电位。Step S904: Obtain the resting potential included in the neuron information corresponding to the neuron type identifier.
在一些实施例中,在基于步骤S902获取神经元的神经元类型后,可以找到与该神经元类型对应的存储空间,然后从该存储空间中读取该类神经元的神经元信息,并从神经元信息中获取静息电位。In some embodiments, after obtaining the neuron type of the neuron based on step S902, the storage space corresponding to the neuron type can be found, and then the neuron information of the neuron of this type is read from the storage space, and from Resting potential is obtained from neuronal information.
例如,神经元类型可以包括A、B两种类型,其中,A类型中神经元的静息电位为-70mv(毫伏),释放阈值为0.7V(伏)。B类型中神经元的静息电位为-70mv,释放阈值为0.9V。在芯片中可以为类型A与B分别维护存储空间。每一存储空间可以存储对应的神经元类型的神经元信息(可以包括静息电位与释放阈值)。针对任意一个神经元,确定其为B类型的神经元的情况下,可以从与类型B对应的存储空间中获取静息电位,从而明确该神经元的静息电位为-70mv。For example, neuron types may include two types, A and B. The resting potential of neurons in type A is -70mv (millivolts) and the release threshold is 0.7V (volts). The resting potential of neurons in type B is -70mv and the release threshold is 0.9V. Storage spaces can be maintained separately for types A and B in the chip. Each storage space can store neuron information of the corresponding neuron type (which may include resting potential and release threshold). For any neuron, if it is determined to be a neuron of type B, the resting potential can be obtained from the storage space corresponding to type B, thereby clarifying that the resting potential of the neuron is -70mv.
由此,针对同一类神经元只存储一份相同的神经元信息即可,无需针对每一个神经元都存储神经元信息,从而可以进一步节省存储空间。As a result, only one copy of the same neuron information for the same type of neuron can be stored, and there is no need to store neuron information for each neuron, which can further save storage space.
在一些实施例中,至少一个神经元的神经元信息可以按照神经元类型预先存储于芯片内。相应的,在步骤S804中,可以响应于当前膜电位与神经元的静息电位不同,关联存储当前膜电位与神经元对应的神经元类型标识;在步骤S806中,可以响应于当前膜电位与静息电位相同,丢弃当前膜电位,存储神经元对应的神经元类型标识。In some embodiments, neuron information of at least one neuron may be pre-stored in the chip according to neuron type. Correspondingly, in step S804, in response to the current membrane potential being different from the resting potential of the neuron, the neuron type identifier corresponding to the current membrane potential and the neuron can be stored in association; in step S806, in response to the current membrane potential being different from the resting potential of the neuron, The resting potential is the same, the current membrane potential is discarded, and the neuron type identifier corresponding to the neuron is stored.
由此可以通过神经元类型,将神经元信息与当前膜电位建立关联,实现关联存储,并且除了只记录工作状态的神经元的膜电位之外,还可以将神经元的神经元类型标识与膜电位关联存储在同一存储空间,从而便于在更新神经元的膜电位时,查询该神经元的其它神经元信息,在提高存储效率与存储空间利用率的同时,还可以提升神经元信息查询体验。Thus, neuron information can be associated with the current membrane potential through the neuron type to achieve associative storage. In addition to only recording the membrane potential of the neuron in the working state, the neuron type identification of the neuron can also be associated with the membrane potential. The potential correlation is stored in the same storage space, which makes it easy to query other neuron information of the neuron when updating the membrane potential of the neuron. While improving storage efficiency and storage space utilization, it can also improve the neuron information query experience.
在一些实施例中,可以根据是否存储目标神经元的膜电位,采用不同的方法获取目标神经元的当前膜电位。In some embodiments, different methods may be used to obtain the current membrane potential of the target neuron depending on whether the membrane potential of the target neuron is stored.
图10为本公开实施例示出的一种获取当前膜电位的方法流程示意图。如图10所示,获取当前膜电位的过程可以包括:Figure 10 is a schematic flowchart of a method for obtaining current membrane potential according to an embodiment of the present disclosure. As shown in Figure 10, the process of obtaining the current membrane potential may include:
步骤S1002,响应于存储目标神经元的膜电位,将存储的目标神经元的膜电位确定为目标神经元的当前膜电位。Step S1002, in response to storing the membrane potential of the target neuron, determine the stored membrane potential of the target neuron as the current membrane potential of the target neuron.
其中,目标神经元可以为芯片模拟的至少一个神经元中的任意神经元。在一些实施例中,可以按照神经元编号,顺序地将芯片包括的各神经元确定为目标神经元。The target neuron can be any neuron among at least one neuron simulated by the chip. In some embodiments, each neuron included in the chip can be sequentially determined as a target neuron according to the neuron number.
在一些实施例中,如果存储目标神经元的膜电位,说明目标神经元为工作状态,可能受到了外界刺激,因此可以将存储的目标神经元的膜电位作为目标神经元的当前膜电位。In some embodiments, if the membrane potential of the target neuron is stored, it means that the target neuron is in a working state and may have received external stimulation. Therefore, the stored membrane potential of the target neuron can be used as the current membrane potential of the target neuron.
步骤S1004,响应于未存储目标神经元的膜电位,将目标神经元对应的静息电位确定为目标神经元的当前膜电位。Step S1004, in response to the fact that the membrane potential of the target neuron is not stored, determine the resting potential corresponding to the target neuron as the current membrane potential of the target neuron.
在一些实施例中,如果未存储目标神经元的膜电位,说明目标神经元为非工作状态,其可能未受到外界刺激,因此可以将目标神经元的静息电位作为目标神经元的当前膜电位。In some embodiments, if the membrane potential of the target neuron is not stored, it means that the target neuron is in a non-working state and may not be stimulated by the outside world. Therefore, the resting potential of the target neuron can be used as the current membrane potential of the target neuron. .
在一些实施例中,可以将至少一个神经元的神经元信息按照神经元类型预先存储于芯片内。相应的,在步骤S1004中,可以获取目标神经元的神经元类型,然后再基于神经元类型,查询目标神经元的神经元信息,并可以将目标神经元的神经元信息包括的静息电位作为目标神经元的当前膜电 位。In some embodiments, neuron information of at least one neuron can be pre-stored in the chip according to neuron type. Correspondingly, in step S1004, the neuron type of the target neuron can be obtained, and then based on the neuron type, the neuron information of the target neuron can be queried, and the resting potential included in the neuron information of the target neuron can be used as The current membrane electricity of the target neuron Bit.
通过步骤S1002和步骤S1004可知,在只记录工作状态的神经元的膜电位的情形下,仍然可以准确地确定目标神经元的当前膜电位,而不论目标神经元处于何种工作状态。It can be seen from steps S1002 and S1004 that when only the membrane potential of neurons in the working state is recorded, the current membrane potential of the target neuron can still be accurately determined regardless of the working state of the target neuron.
在一些实施例中,在确定目标神经元的当前膜电位之后,还可以将当前膜电位与目标神经元的释放阈值进行比较。如果当前膜电位达到释放阈值,则可以使目标神经元向与其连接的神经元发送脉冲信号。In some embodiments, after determining the current membrane potential of the target neuron, the current membrane potential may also be compared with the release threshold of the target neuron. If the current membrane potential reaches the release threshold, the target neuron can be caused to send a pulse signal to the neuron to which it is connected.
在一些实施例中,针对同一类型的神经元可以只存储一次神经元类型标识,从而进一步减少存储空间。In some embodiments, the neuron type identifier can be stored only once for the same type of neuron, thereby further reducing storage space.
例如,可以将至少一个神经元的神经元信息按照神经元类型预先存储于芯片内;芯片内存储了至少一个神经元的神经元类型标识。相应的,在步骤S804中,可以响应于当前膜电位与神经元的静息电位不同,存储神经元的编号标识和当前膜电位,并将存储的编号标识和当前膜电位,与神经元的神经元类型标识相关联。For example, the neuron information of at least one neuron can be pre-stored in the chip according to the neuron type; the neuron type identifier of at least one neuron is stored in the chip. Correspondingly, in step S804, in response to the current membrane potential being different from the resting potential of the neuron, the number identification and the current membrane potential of the neuron can be stored, and the stored number identification and the current membrane potential can be compared with the neuron's neuron potential. Metatype identifier associated.
在一些实施例中,编号标识,可以是预先为芯片包括的各神经元分配的编号ID。In some embodiments, the number identification may be a number ID assigned in advance to each neuron included in the chip.
在一些实施例中,各编号标识可以指示唯一的神经元。In some embodiments, each numbered identifier may indicate a unique neuron.
在一些实施例中,可以维护编号标识与神经元类型之间的映射关系。通过该映射关系以及神经元的编号,即可获知神经元的神经元类型。例如,芯片可以维护编号标识1-100映射为类型A,编号标识101-200映射为类型B。如果神经元编号标识为50,则可以确定该神经元的类型为A。In some embodiments, a mapping relationship between numbered identifiers and neuron types may be maintained. Through this mapping relationship and the number of the neuron, the neuron type of the neuron can be known. For example, the chip can maintain numbering identifiers 1-100 mapped to type A, and numbering identifiers 101-200 mapped to type B. If the neuron number is 50, it can be determined that the neuron type is A.
在一些实施例中,编号标识还可以体现神经元的神经元类型。换言之,通过神经元的编号标识即可获知神经元的神经元类型。例如,神经元的编号为B1,则可以指示该神经元为B类型的神经元,且编号标识为1。例如,神经元的编号为A10,则可以指示该神经元为A类型的神经元,且编号标识为10。In some embodiments, the number identifier may also reflect the neuron type of the neuron. In other words, the neuron type of a neuron can be known by its number identification. For example, if the number of the neuron is B1, it can indicate that the neuron is a type B neuron and the number is 1. For example, if the number of the neuron is A10, it can indicate that the neuron is a type A neuron and the number is 10.
相应的,在步骤S804中,响应于当前膜电位与神经元的静息电位不同,可以确定芯片中是否存储神经元的类型标识。如果芯片存储了神经元的类型标识,可以将神经元的编号标识,以及获取的当前膜电位与类型标识关联存储。Correspondingly, in step S804, in response to the current membrane potential being different from the resting potential of the neuron, it may be determined whether the type identifier of the neuron is stored in the chip. If the chip stores the type identification of the neuron, the number identification of the neuron and the obtained current membrane potential can be stored in association with the type identification.
如果芯片未存储神经元的类型标识,可以先存储神经元的类型标识,然后将神经元的编号标识,以及获取的当前膜电位与类型标识关联存储。If the chip does not store the type identifier of the neuron, it can first store the type identifier of the neuron, and then store the neuron number identifier and the obtained current membrane potential in association with the type identifier.
例如,可以为每一类型的神经元分配一段存储空间。相应的,在步骤S804中获取神经元的类型后,可以确定芯片中是否为该类型分配有一段存储空间。如果是,将该神经元的编号标识与获取的当前膜电位关联存储至与该类型对应的存储空间中。如果否,可以先为该类型神经元分配一段存储空间,然后将该神经元的编号标识与获取的当前膜电位关联存储至与该类型对应的存储空间中。由此能够实现将同一类型的神经元的当前膜电位存储于与类型对应的存储空间中,从而可以无需针对每一神经元存储神经元类型标识,能够进一步节省存储空间。For example, a section of storage space can be allocated for each type of neuron. Correspondingly, after obtaining the type of neuron in step S804, it can be determined whether there is a storage space allocated for this type in the chip. If so, associate the number identification of the neuron with the obtained current membrane potential and store it in the storage space corresponding to the type. If not, you can first allocate a storage space for this type of neuron, and then associate the number identification of the neuron with the obtained current membrane potential and store it in the storage space corresponding to this type. In this way, the current membrane potential of neurons of the same type can be stored in the storage space corresponding to the type, so that there is no need to store a neuron type identifier for each neuron, which can further save storage space.
在一些实施例中,可以采用图11所示的方法获取目标神经元的当前膜电位。In some embodiments, the method shown in Figure 11 can be used to obtain the current membrane potential of the target neuron.
图11为本公开实施例示出的一种获取当前膜电位的方法流程示意图。如图11所示,获取当前膜电位的过程可以包括:Figure 11 is a schematic flowchart of a method for obtaining current membrane potential according to an embodiment of the present disclosure. As shown in Figure 11, the process of obtaining the current membrane potential may include:
S1102,响应于存储目标神经元的编号标识,将与目标神经元的编号关联存储的膜电位确定为目标神经元的当前膜电位。S1102. In response to storing the number identification of the target neuron, determine the membrane potential stored in association with the number of the target neuron as the current membrane potential of the target neuron.
在一些实施例中,目标神经元可以为芯片模拟的至少一个神经元中的任意神经元。In some embodiments, the target neuron may be any neuron in at least one neuron simulated by the chip.
在一些实施例中,可以按照神经元编号,依次将芯片包括的各神经元确定为目标神经元。In some embodiments, each neuron included in the chip can be determined as a target neuron in sequence according to the neuron number.
在一些实施例中,如果存储目标神经元的编号标识,说明目标神经元为工作状态,可能受到了外界刺激,因此可以将与目标神经元的编号关联存储的膜电位作为当前膜电位。In some embodiments, if the number identification of the target neuron is stored, it means that the target neuron is in a working state and may have received external stimulation. Therefore, the membrane potential stored in association with the number of the target neuron can be used as the current membrane potential.
S1104,响应于未存储目标神经元的编号标识,将目标神经元对应的静息电位确定为目标神经元的当前膜电位。S1104. In response to the number identification of the target neuron not being stored, determine the resting potential corresponding to the target neuron as the current membrane potential of the target neuron.
在一些实施例中,如果未存储目标神经元的编号标识,说明目标神经元为非工作状态,即未受到外界刺激或者刺激较小,因此可以将目标神经元的静息电位作为当前膜电位。In some embodiments, if the number identification of the target neuron is not stored, it means that the target neuron is in a non-working state, that is, it does not receive external stimulation or the stimulation is small. Therefore, the resting potential of the target neuron can be used as the current membrane potential.
在一些实施例中,可以将至少一个神经元的神经元信息按照神经元类型预先存储于芯片内。相应的,在步骤S1104中,可以获取目标神经元的神经元类型,再基于神经元类型,查询目标神经元的神经元信息,并可以将目标神经元的神经元信息包括的静息电位作为目标神经元的当前膜电位。In some embodiments, neuron information of at least one neuron can be pre-stored in the chip according to neuron type. Correspondingly, in step S1104, the neuron type of the target neuron can be obtained, and then based on the neuron type, the neuron information of the target neuron can be queried, and the resting potential included in the neuron information of the target neuron can be used as the target. The current membrane potential of the neuron.
由此可知,可以在针对同一类神经元只存储一次类型标识的情形下,准确确定目标神经元的当前膜电位。It can be seen that the current membrane potential of the target neuron can be accurately determined while only storing the type identifier once for the same type of neuron.
在一些实施例中,在确定目标神经元的当前膜电位之后,还可以将当前膜电位与目标神经元的 释放阈值进行比较。如果当前膜电位达到释放阈值,则可以使目标神经元向与其连接的神经元发送脉冲信号。In some embodiments, after determining the current membrane potential of the target neuron, the current membrane potential can also be compared with the current membrane potential of the target neuron. Release threshold is compared. If the current membrane potential reaches the release threshold, the target neuron can be caused to send a pulse signal to the neuron to which it is connected.
在一些实施例中,为了便于对神经元的膜电位进行管理(例如,管理可以包括更新与读取),可以按照神经元的神经网络层划分存储空间,并将神经元的神经元信息存储在神经元所属的网络层对应的存储空间中。由此便于逐层逐个对神经元的膜电位进行管理。In some embodiments, in order to facilitate the management of the membrane potential of neurons (for example, management may include updating and reading), the storage space may be divided according to the neural network layer of the neuron, and the neuron information of the neuron may be stored in In the storage space corresponding to the network layer to which the neuron belongs. This facilitates management of the membrane potential of neurons layer by layer.
以下结合对脑类芯片神经元信息进行管理的场景,进行示例性说明。The following is an exemplary description based on the scenario of managing neuron information in a brain chip.
在一些实施例中,脑类芯片可以包括一个或多个计算内核。其中,每个计算内核可以模拟一个或多个神经元,或者多个计算内核可以模拟一个神经元,本公开实施例对此不作限制。神经元可以是脉冲神经网络中的神经元。可以预先对每个神经元进行编号和确定神经元类型,并可以在芯片中存储神经元编号与神经元类型的映射关系。每种神经元类型可以对应一些静态神经元信息(即不论神经元是否受刺激不会变化的信息,可以包括静息电位)。芯片可以按照神经元类型存储静态神经元信息。芯片还可以按照神经元类型分配用于存储当前膜电位的存储空间。In some embodiments, a brain-based chip may include one or more computing cores. Each computing core can simulate one or more neurons, or multiple computing cores can simulate one neuron. This is not limited in the embodiments of the present disclosure. The neuron may be a neuron in a spiking neural network. Each neuron can be numbered and the neuron type determined in advance, and the mapping relationship between neuron numbers and neuron types can be stored in the chip. Each neuron type can correspond to some static neuron information (i.e., information that does not change whether the neuron is stimulated or not, which can include resting potential). The chip can store static neuron information by neuron type. The chip can also allocate storage space for storing current membrane potentials by neuron type.
在一些实施例中,可以先执行步骤S802。即在步骤S802中,可以根据神经元的受刺激信息,确定神经元的当前膜电位,以及根据神经元的编号和前述映射关系,确定其神经元类型,并获取其静息电位。In some embodiments, step S802 may be performed first. That is, in step S802, the current membrane potential of the neuron can be determined based on the neuron's stimulation information, and its neuron type can be determined based on the neuron number and the aforementioned mapping relationship, and its resting potential can be obtained.
在步骤S804中,如果膜电位与静息电位不相同,则说明神经元受到刺激,可以确定芯片中是否为该类神经元分配存储空间,如果是,将神经元的编号和膜电位关联存储在分配的存储空间。如果否,可以先为该类神经元分配存储空间,然后将神经元的编号和膜电位关联存储在分配的存储空间。In step S804, if the membrane potential is different from the resting potential, it means that the neuron is stimulated. It can be determined whether the chip allocates storage space for this type of neuron. If so, the number of the neuron and the membrane potential are associated and stored in allocated storage space. If not, you can first allocate storage space for this type of neuron, and then associate the number of the neuron with the membrane potential and store it in the allocated storage space.
在步骤S806中,如果膜电位与静息电位相同,则说明神经元为非工作状态,则可以丢弃膜电位,无需存储。In step S806, if the membrane potential is the same as the resting potential, it means that the neuron is in a non-working state, and the membrane potential can be discarded without storage.
通过前述步骤在脑类型芯片中,一方面,可以为同一类神经元分配一块存储空间,即同一块存储空间内的神经元具有同一神经元类型,因此无需针对每一神经元记录其神经元型号信息,能够进一步节省存储空间。另一方面,同一块存储空间内只记录工作状态下的神经元的编号标识与膜电位,无需记录非工作状态下的神经元的相关信息,从而无需为非工作状态下的神经元分配存储空间,从而可以进一步节省存储空间。再一方面,将同一类型的神经元的神经元信息分配在同一块存储空间中,便于查询神经元的膜电位。Through the aforementioned steps, in the brain-type chip, on the one hand, a storage space can be allocated for the same type of neurons, that is, the neurons in the same storage space have the same neuron type, so there is no need to record the neuron model for each neuron. information, which can further save storage space. On the other hand, the same storage space only records the number identification and membrane potential of the neurons in the working state. There is no need to record the relevant information of the neurons in the non-working state, so there is no need to allocate storage space for the neurons in the non-working state. , which can further save storage space. On the other hand, allocating neuron information of the same type of neurons in the same storage space makes it easier to query the membrane potential of neurons.
在查询脑类芯片神经元的当前膜电位时,可以根据神经元编号从小到大,依次确定目标神经元,并可以执行S1102和S1104,从而能够准确确定目标神经元的当前膜电位。When querying the current membrane potential of a brain chip neuron, the target neuron can be determined sequentially according to the neuron number from small to large, and S1102 and S1104 can be executed, so that the current membrane potential of the target neuron can be accurately determined.
第二方面,本公开实施例提供一种信息处理单元。In a second aspect, embodiments of the present disclosure provide an information processing unit.
图12为本公开实施例提供的一种信息处理单元的组成框图。参照图12,该信息处理单元1200包括:Figure 12 is a block diagram of an information processing unit provided by an embodiment of the present disclosure. Referring to Figure 12, the information processing unit 1200 includes:
处理子单元1201,被配置为基于神经元的待处理信息与目标信息之间的差异信息,执行待处理信息的处理操作;The processing subunit 1201 is configured to perform processing operations on the information to be processed based on the difference information between the information to be processed and the target information of the neuron;
其中,待处理信息包括神经元的权重值,权重值对应的目标信息包括权重数值区间,处理操作包括对所述权重值调整存储精度的存储处理或者未调整存储精度的存储处理,和/或,待处理信息包括神经元的膜电位,膜电位对应的目标信息包括静息电位,处理操作包括对膜电位的存储处理或者丢弃处理。Wherein, the information to be processed includes the weight value of the neuron, the target information corresponding to the weight value includes the weight value interval, and the processing operation includes storage processing of adjusting the storage accuracy of the weight value or storage processing without adjusting the storage accuracy, and/or, The information to be processed includes the membrane potential of the neuron, the target information corresponding to the membrane potential includes the resting potential, and the processing operation includes storing or discarding the membrane potential.
在一些实施例中,本公开实施例的信息处理装置可应用于权重值的存储。In some embodiments, the information processing device of the embodiment of the present disclosure may be applied to the storage of weight values.
在一些实施例中,处理子单元可以包括权重存储装置,权重存储装置可以包括:In some embodiments, the processing subunit may include a weight storage device, and the weight storage device may include:
划分模块,被配置为将当前处理核的神经元与目标处理核的神经元之间的多个权重值划分为多个目标权重组,目标权重组包括多个目标权重值;a dividing module configured to divide multiple weight values between neurons of the current processing core and neurons of the target processing core into multiple target weight groups, where the target weight group includes multiple target weight values;
判断模块,被配置为针对各个目标权重组,判断目标权重组中多个目标权重值是否位于目标权重数值区间内;The judgment module is configured to judge whether multiple target weight values in the target weight group are within the target weight value range for each target weight group;
存储模块,被配置为在目标权重组的多个目标权重值位于目标权重数值区间内的情况下,将多个目标权重值按照目标存储精度进行存储,目标存储精度低于目标权重值的当前存储精度。The storage module is configured to store the multiple target weight values according to the target storage accuracy when the multiple target weight values of the target weight group are within the target weight value range, and the target storage accuracy is lower than the current storage of the target weight value. Accuracy.
图13为本公开实施例提供的一种权重存储装置的组成框图,可应用于权重值的存储。Figure 13 is a block diagram of a weight storage device provided by an embodiment of the present disclosure, which can be applied to the storage of weight values.
参照图13,该权重存储装置1300可以包括:Referring to Figure 13, the weight storage device 1300 may include:
划分模块1310,被配置为将当前处理核的神经元与目标处理核的神经元之间的所有连接权重划分为多个目标权重组,目标权重组包括多个目标权重值;The dividing module 1310 is configured to divide all connection weights between the neurons of the current processing core and the neurons of the target processing core into multiple target weight groups, where the target weight group includes multiple target weight values;
判断模块1320,被配置为针对每个目标权重组,判断该目标权重组中各目标权重值是否均位于目标权重数值区间内; The judgment module 1320 is configured to, for each target weight group, judge whether each target weight value in the target weight group is within the target weight value range;
存储模块1330,被配置为在判断模块1320判断出各目标权重值均位于目标权重数值区间内的情况下,将各目标权重值按照目标存储精度进行存储,目标存储精度低于目标权重值的当前存储精度。The storage module 1330 is configured to store each target weight value according to the target storage accuracy when the judgment module 1320 determines that each target weight value is within the target weight value interval, and the target storage accuracy is lower than the current target weight value. Storage accuracy.
图14为本公开实施例提供的一种权重存储装置的组成框图,可应用于权重值的存储。Figure 14 is a block diagram of a weight storage device provided by an embodiment of the present disclosure, which can be applied to the storage of weight values.
参照图14,该权重存储装置1400可以包括:确定模块1440、划分模块1410、判断模块1420和存储模块1430。Referring to FIG. 14 , the weight storage device 1400 may include: a determination module 1440 , a dividing module 1410 , a judgment module 1420 and a storage module 1430 .
其中,确定模块1440,被配置为在划分模块1410将当前处理核的神经元与目标处理核的神经元之间的所有权重值划分为多个目标权重组之前,确定出预设权重数值区间。划分模块1410、判断模块1420和存储模块1430可以参见本公开实施例的相关内容,在此不再展开描述。The determination module 1440 is configured to determine the preset weight value interval before the dividing module 1410 divides all weight values between the neurons of the current processing core and the neurons of the target processing core into multiple target weight groups. For the division module 1410, the judgment module 1420 and the storage module 1430, please refer to the relevant content of the embodiments of the present disclosure, and the description will not be further elaborated here.
本公开实施例中,目标权重数值区间可基于不同的方式确定出,在一些实施例中,目标权重数值区间由本领域技术人员基于经验确定出;在一些实施例中,可通过对众核系统中所包含的所有权重值进行统计计算来确定出目标权重数值区间。In the embodiments of the present disclosure, the target weight value interval can be determined based on different methods. In some embodiments, the target weight value interval is determined by those skilled in the art based on experience; in some embodiments, the target weight value interval can be determined by analyzing the many-core system. All included weight values are statistically calculated to determine the target weight range.
在一些实施例中,参照图14,确定模块1440可以包括:获取子模块1441、统计子模块1442和确定子模块1443。In some embodiments, referring to FIG. 14 , the determination module 1440 may include: an acquisition sub-module 1441 , a statistics sub-module 1442 and a determination sub-module 1443 .
其中,获取子模块1441被配置为获取众核系统中所包含的所有权重值;统计子模块1442被配置为对所获取的所有权重值进行正态分布统计以确定出多个权重值的正态分布规律;确定子模块1443被配置为将正态分布规律中分布概率满足预设概率值的权重范围,确定为目标权重数值区间。Among them, the acquisition sub-module 1441 is configured to acquire all weight values contained in the many-core system; the statistics sub-module 1442 is configured to perform normal distribution statistics on all acquired weight values to determine the normality of multiple weight values. Distribution rule; the determination sub-module 1443 is configured to determine the weight range in which the distribution probability satisfies the preset probability value in the normal distribution rule as the target weight value range.
在本公开实施例中,权重存储装置可用于实现权重存储,该权重存储装置所具有的功能模块及各功能模块之间的交互过程可以参见本公开实施例的信息处理方法中关于权重存储的相关内容,此处不再赘述。In the embodiment of the present disclosure, the weight storage device can be used to implement weight storage. For the functional modules of the weight storage device and the interaction process between the functional modules, please refer to the relevant information about weight storage in the information processing method of the embodiment of the present disclosure. The content will not be repeated here.
由此可知,本公开实施例所提供的权重存储装置,在对神经元对应的权重值进行存储时,将神经元之间的权重值划分为目标权重组,针对每个目标权重组判断其包含的权重值是否均处于预设的属于较小范畴的目标权重数值区间内,若是,则将该目标权重组所包含的权重值以低于当前存储精度的目标存储精度进行存储,从而缩减了神经元的权重存储所占用的存储空间,进而减少了对神经形态芯片的存储空间的无效占用,降低了神经形态芯片的存储需求,从而有利于神经形态芯片的扩展应用。It can be seen from this that the weight storage device provided by the embodiment of the present disclosure, when storing the weight values corresponding to the neurons, divides the weight values between neurons into target weight groups, and determines for each target weight group whether it contains Whether the weight values are all within the preset target weight value range belonging to a smaller range, if so, the weight values contained in the target weight group are stored with a target storage precision lower than the current storage precision, thereby reducing the neural network The memory space occupied by the weight storage of the element is reduced, thereby reducing the ineffective occupation of the storage space of the neuromorphic chip and reducing the storage requirements of the neuromorphic chip, thereby conducive to the expanded application of neuromorphic chips.
在一些实施例中,本公开实施例的信息处理装置可应用于膜电位的存储。In some embodiments, the information processing device of the embodiment of the present disclosure may be applied to the storage of membrane potential.
在一些实施例中,信息处理单元可应用于芯片,其中,芯片通过其包括的至少一个计算核模拟至少一个神经元,相应的,信息处理单元包括神经元信息处理装置;In some embodiments, the information processing unit can be applied to a chip, wherein the chip simulates at least one neuron through at least one computing core it includes, and accordingly, the information processing unit includes a neuron information processing device;
在一些实施例中,神经元信息处理装置可以包括:In some embodiments, the neuron information processing device may include:
获取模块,被配置为获取至少一个神经元的当前膜电位;an acquisition module configured to acquire the current membrane potential of at least one neuron;
存储模块,被配置为响应于当前膜电位与神经元的静息电位不同,关联存储当前膜电位与神经元的神经元信息;以及,响应于当前膜电位与静息电位相同,丢弃当前膜电位。a storage module configured to, in response to the current membrane potential being different from the resting potential of the neuron, associate and store the current membrane potential with the neuron information of the neuron; and, in response to the current membrane potential being the same as the resting potential, discard the current membrane potential .
图15为本公开实施例提供的一种神经元信息处理装置的组成框图,可应用于膜电位的存储。Figure 15 is a block diagram of a neuron information processing device provided by an embodiment of the present disclosure, which can be applied to the storage of membrane potential.
参照图15,该神经元信息处理装置1500可以包括:Referring to Figure 15, the neuron information processing device 1500 may include:
获取模块1510,被配置为获取至少一个神经元的当前膜电位;The acquisition module 1510 is configured to acquire the current membrane potential of at least one neuron;
存储模块1520,被配置为响应于当前膜电位与神经元的静息电位不同,关联存储当前膜电位与神经元的神经元信息;以及,响应于当前膜电位与静息电位相同,丢弃当前膜电位。The storage module 1520 is configured to, in response to the current membrane potential being different from the resting potential of the neuron, associate and store the current membrane potential with the neuron information of the neuron; and, in response to the current membrane potential being the same as the resting potential, discard the current membrane potential. Potential.
由此可知,本公开实施例所提供的神经元信息处理装置,在对神经元的膜电位进行存储时,通过比较神经元的当前膜电位与静息电位确定神经元的工作状态,从而基于工作状态确定是否存储当前膜电位,基于此可以减少由于存储非工作状态的神经元的膜电位造成的存储压力,减少对存储资源的占用。换言之,在神经元的膜电位等于其静息电位的情况下,可以说明该神经元处于非工作状态,在膜电位不等于静息电位的情况下,可以说明神经元处于工作状态,因此,通过响应于当前膜电位与神经元的静息电位不同,可以关联存储当前膜电位与神经元的神经元信息,以保障存储工作中的神经元的膜电位信息,并且,响应于当前膜电位与静息电位相同,丢弃当前膜电位,以减少非工作状态的神经元的信息存储量,实现可以只存储工作状态下的神经元的膜电位,无需存储非工作状态下的神经元的膜电位的效果,从而能够有效节省存储空间。It can be seen from this that the neuron information processing device provided by the embodiment of the present disclosure determines the working state of the neuron by comparing the current membrane potential and the resting potential of the neuron when storing the membrane potential of the neuron, thereby based on the working state of the neuron. The state determines whether to store the current membrane potential. Based on this, the storage pressure caused by storing the membrane potential of neurons in a non-working state can be reduced and the occupation of storage resources can be reduced. In other words, when the membrane potential of a neuron is equal to its resting potential, it can be said that the neuron is in a non-working state. When the membrane potential is not equal to its resting potential, it can be said that the neuron is in a working state. Therefore, by In response to the current membrane potential being different from the resting potential of the neuron, the current membrane potential and the neuron information of the neuron can be stored in association to ensure that the membrane potential information of the working neuron is stored, and in response to the current membrane potential being different from the resting potential, The current membrane potential is the same, and the current membrane potential is discarded to reduce the amount of information storage of neurons in the non-working state, so that only the membrane potential of the neurons in the working state can be stored, without the need to store the membrane potential of the neurons in the non-working state. , thus effectively saving storage space.
需要说明的是,在本公开的一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其可选的实现方式和技术效果可参照上文方法实施例的描述,为了简洁,这里不再赘述。It should be noted that in some embodiments of the present disclosure, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to perform the method described in the above method embodiments, and its optional implementation methods and technical effects Reference may be made to the description of the method embodiments above. For the sake of brevity, details will not be described again here.
第三方面,本公开实施例提供一种芯片,该芯片可应用于执行本公开实施例的任一项的信息处 理方法。In a third aspect, embodiments of the disclosure provide a chip that can be used to perform information processing in any of the embodiments of the disclosure. management method.
图16为本公开实施例提供的一种芯片的组成框图,可应用于执行本公开实施例任一项的信息处理方法。FIG. 16 is a block diagram of a chip provided by an embodiment of the present disclosure, which can be applied to perform any information processing method according to the embodiment of the present disclosure.
参照图16,该芯片1600可以包括至少一个计算核,且计算核可以模拟至少一个神经元,其中:Referring to Figure 16, the chip 1600 may include at least one computing core, and the computing core may simulate at least one neuron, where:
计算核1601,被配置为基于神经元的待处理信息与目标信息之间的差异信息,执行待处理信息的处理操作;The computing core 1601 is configured to perform processing operations on the information to be processed based on the difference information between the information to be processed and the target information of the neuron;
其中,待处理信息包括神经元的权重值,权重值对应的目标信息包括权重数值区间,处理操作包括对所述权重值调整存储精度的存储处理或者未调整存储精度的存储处理,和/或,待处理信息包括神经元的膜电位,膜电位对应的目标信息包括静息电位,处理操作包括对膜电位的存储处理或者丢弃处理。Wherein, the information to be processed includes the weight value of the neuron, the target information corresponding to the weight value includes the weight value interval, and the processing operation includes storage processing of adjusting the storage accuracy of the weight value or storage processing without adjusting the storage accuracy, and/or, The information to be processed includes the membrane potential of the neuron, the target information corresponding to the membrane potential includes the resting potential, and the processing operation includes storing or discarding the membrane potential.
在一些实施例中,芯片中的计算核(也可以视为处理核),可以被配置为将当前处理核的神经元与目标处理核的神经元之间的多个权重值划分为多个目标权重组,目标权重组包括多个目标权重值;针对各个目标权重组,判断目标权重组中多个目标权重值是否位于目标权重数值区间内;在目标权重组的多个目标权重值位于目标权重数值区间内的情况下,将多个目标权重值按照目标存储精度进行存储,目标存储精度低于目标权重值的当前存储精度。In some embodiments, the computing core (which can also be regarded as a processing core) in the chip can be configured to divide multiple weight values between the neurons of the current processing core and the neurons of the target processing core into multiple targets. Weight group, the target weight group includes multiple target weight values; for each target weight group, determine whether the multiple target weight values in the target weight group are within the target weight value range; the multiple target weight values in the target weight group are within the target weight value In the case of within the numerical range, multiple target weight values are stored according to the target storage precision, and the target storage precision is lower than the current storage precision of the target weight value.
在一些实施例中,芯片中的计算核,可以被配置为获取至少一个神经元的当前膜电位;响应于当前膜电位与神经元的静息电位不同,关联存储当前膜电位与神经元的神经元信息;响应于当前膜电位与静息电位相同,丢弃当前膜电位。In some embodiments, the computing core in the chip may be configured to obtain the current membrane potential of at least one neuron; in response to the current membrane potential being different from the resting potential of the neuron, associate and store the current membrane potential with the neuron's neuron. Metainformation; in response to the current membrane potential being the same as the resting potential, discard the current membrane potential.
第四方面,本公开实施例提供一种电子设备。In a fourth aspect, embodiments of the present disclosure provide an electronic device.
图17为本公开实施例提供的一种电子设备的框图。Figure 17 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
参照图17,本公开实施例提供了一种电子设备,该电子设备包括多个处理核1701以及片上网络1702,其中,多个处理核1701均与片上网络1702连接,片上网络1702被配置为交互多个处理核间的数据和外部数据。Referring to Figure 17, an embodiment of the present disclosure provides an electronic device. The electronic device includes multiple processing cores 1701 and an on-chip network 1702. The multiple processing cores 1701 are connected to the on-chip network 1702, and the on-chip network 1702 is configured to interact Data between multiple processing cores and external data.
其中,一个或多个处理核1701中存储有一个或多个指令,一个或多个指令被一个或多个处理核1701执行,以使一个或多个处理核1701能够执行上述的信息处理方法。One or more instructions are stored in one or more processing cores 1701, and the one or more instructions are executed by one or more processing cores 1701, so that the one or more processing cores 1701 can execute the above information processing method.
在一些实施例中,该电子设备可以是类脑芯片,由于类脑芯片可以采用向量化计算方式,且需要通过外部内存例如双倍速率(Double Data Rate,DDR)同步动态随机存储器调入神经网络模型的权重信息等参数。因此,本公开实施例采用批处理的运算效率较高。In some embodiments, the electronic device may be a brain-like chip, because the brain-like chip can adopt a vectorized calculation method and needs to be loaded into the neural network through an external memory such as a double data rate (Double Data Rate, DDR) synchronous dynamic random access memory. Model weight information and other parameters. Therefore, the operation efficiency of batch processing in the embodiments of the present disclosure is relatively high.
图18为本公开实施例提供的一种电子设备的框图。Figure 18 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
参照图18,本公开实施例提供了一种电子设备,该电子设备包括:至少一个处理器1801;至少一个存储器1802,以及一个或多个I/O接口1803,连接在处理器1801与存储器1802之间;其中,存储器1802存储有可被至少一个处理器1801执行的一个或多个计算机程序,一个或多个计算机程序被至少一个处理器1801执行,以使至少一个处理器1801能够执行上述的信息处理方法。Referring to Figure 18, an embodiment of the present disclosure provides an electronic device, which includes: at least one processor 1801; at least one memory 1802, and one or more I/O interfaces 1803, connected between the processor 1801 and the memory 1802 among them, the memory 1802 stores one or more computer programs that can be executed by at least one processor 1801, and the one or more computer programs are executed by at least one processor 1801, so that at least one processor 1801 can execute the above-mentioned Information processing methods.
本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序。Embodiments of the present disclosure also provide a computer-readable storage medium with a computer program stored thereon.
图19为本公开实施例提供的一种计算机可读介质的组成框图。其中,计算机程序在被处理器/处理核执行时实现上述的数据处理方法。计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。Figure 19 is a block diagram of a computer-readable medium provided by an embodiment of the present disclosure. Wherein, the computer program implements the above data processing method when executed by the processor/processing core. Computer-readable storage media may be volatile or non-volatile computer-readable storage media.
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当该计算机可读代码在电子设备的处理器中运行时,该电子设备中的处理器执行上述信息处理方法。Embodiments of the present disclosure also provide a computer program product, including a computer readable code, or a non-volatile computer readable storage medium carrying the computer readable code, when the computer readable code is stored in a processor of an electronic device When running, the processor in the electronic device executes the above information processing method.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读存储介质上,计算机可读存储介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。Those of ordinary skill in the art can understand that all or some steps, systems, and functional modules/units in the devices disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may consist of several physical components. Components execute cooperatively. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit . Such software may be distributed on computer-readable storage media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读程序指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM)、静态随机存取存储器(SRAM)、闪存或其他存储器技术、 便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读程序指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。As is known to those of ordinary skill in the art, the term computer storage media includes volatile and non-volatile media implemented in any method or technology for storage of information such as computer readable program instructions, data structures, program modules or other data. lossless, removable and non-removable media. Computer storage media includes, but is not limited to, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, Portable Compact Disk Read Only Memory (CD-ROM), Digital Versatile Disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or can be used to store desired information and can be accessed by a computer any other media. Additionally, it is known to those of ordinary skill in the art that communication media typically embodies computer readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery medium.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to various computing/processing devices, or to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage on a computer-readable storage medium in the respective computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for performing operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages. Source code or object code written in any combination of programming languages including object-oriented programming languages - such as Smalltalk, C++, etc., and conventional procedural programming languages - such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server implement. In situations involving remote computers, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through the Internet). connect). In some embodiments, by utilizing state information of computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can Computer readable program instructions are executed to implement various aspects of the disclosure.
这里所描述的计算机程序产品可以通过硬件、软件或其结合的方式实现。在一个可选实施例中,计算机程序产品可以体现为计算机存储介质,在一个可选实施例中,计算机程序产品可以体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program products described herein may be implemented in hardware, software, or a combination thereof. In an optional embodiment, the computer program product can be embodied as a computer storage medium. In an optional embodiment, the computer program product can be embodied as a software product, such as a software development kit (Software Development Kit, SDK) and so on.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, thereby producing a machine that, when executed by the processor of the computer or other programmable data processing apparatus, , resulting in an apparatus that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium. These instructions cause the computer, programmable data processing device and/or other equipment to work in a specific manner. Therefore, the computer-readable medium storing the instructions includes An article of manufacture that includes instructions that implement aspects of the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other equipment, causing a series of operating steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executed on a computer, other programmable data processing apparatus, or other equipment to implement the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,前述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions that contains one or more operable elements for implementing the specified logical function(s). Execute instructions. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two consecutive blocks may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts. , or can be implemented using a combination of specialized hardware and computer instructions.
本文已经公开了示例实施例,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则可单独使用与特定实施例相结合描述的特征、特性和/或元素,或可与其他实施例相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。 Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted in a general illustrative sense only and not for purpose of limitation. In some instances, it will be apparent to those skilled in the art that features, characteristics and/or elements described in connection with a particular embodiment may be used alone, or may be used in conjunction with other embodiments, unless expressly stated otherwise. Features and/or components used in combination. Accordingly, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims (30)

  1. 一种信息处理方法,其中,包括:An information processing method, including:
    基于神经元的待处理信息与目标信息之间的差异信息,执行所述待处理信息的处理操作;Based on the difference information between the information to be processed and the target information of the neuron, perform the processing operation of the information to be processed;
    其中,所述待处理信息包括神经元的权重值,所述权重值对应的目标信息包括权重数值区间,所述处理操作包括对所述权重值调整存储精度的存储处理或者未调整存储精度的存储处理,和/或,Wherein, the information to be processed includes the weight value of the neuron, the target information corresponding to the weight value includes the weight value interval, and the processing operation includes storage processing of adjusting the storage accuracy of the weight value or storage without adjusting the storage accuracy. processing, and/or,
    所述待处理信息包括神经元的膜电位,所述膜电位对应的目标信息包括静息电位,所述处理操作包括对所述膜电位的存储处理或者丢弃处理。The information to be processed includes the membrane potential of the neuron, the target information corresponding to the membrane potential includes the resting potential, and the processing operation includes storage processing or discarding processing of the membrane potential.
  2. 根据权利要求1所述的信息处理方法,其中,所述待处理信息包括至少一个目标权重组的多个目标权重值,所述目标信息包括目标权重数值区间,所述差异信息用于表征所述目标权重组的多个目标权重值与所述目标权重数值区间的范围关系,所述处理操作包括以所述目标权重组为单位执行调整存储精度的多个目标权重值的存储处理,或者,以所述目标权重组为单位执行未调整存储精度的多个目标权重值的存储处理。The information processing method according to claim 1, wherein the information to be processed includes a plurality of target weight values of at least one target weight group, the target information includes a target weight value interval, and the difference information is used to characterize the The range relationship between the multiple target weight values of the target weight group and the target weight value interval, the processing operation includes performing storage processing of adjusting the storage accuracy of the multiple target weight values in units of the target weight group, or, in The target weight group performs storage processing of multiple target weight values without adjusting the storage accuracy in units.
  3. 根据权利要求2所述的信息处理方法,应用于权重存储,其中,所述信息处理方法包括:The information processing method according to claim 2, applied to weight storage, wherein the information processing method includes:
    将当前处理核的神经元与目标处理核的神经元之间的多个权重值划分为多个目标权重组,所述目标权重组包括多个目标权重值;Divide multiple weight values between neurons of the current processing core and neurons of the target processing core into multiple target weight groups, where the target weight groups include multiple target weight values;
    针对各个目标权重组,判断所述目标权重组中多个目标权重值是否位于目标权重数值区间内;For each target weight group, determine whether multiple target weight values in the target weight group are within the target weight value range;
    在所述目标权重组的多个目标权重值位于所述目标权重数值区间内的情况下,将多个所述目标权重值按照目标存储精度进行存储,所述目标存储精度低于所述目标权重值的当前存储精度。When multiple target weight values of the target weight group are located within the target weight numerical interval, multiple target weight values are stored according to the target storage accuracy, and the target storage accuracy is lower than the target weight. The current storage precision of the value.
  4. 根据权利要求3所述的信息处理方法,其中,所述将多个所述目标权重值按照目标存储精度进行存储,包括:The information processing method according to claim 3, wherein storing the plurality of target weight values according to target storage accuracy includes:
    将多个所述目标权重值以数据包的形式进行存储,所述数据包内包括所述目标权重值和所述目标存储精度。A plurality of the target weight values are stored in the form of a data packet, and the data packet includes the target weight value and the target storage accuracy.
  5. 根据权利要求3所述的信息处理方法,其中,在所述目标权重组的多个目标权重值中存在至少一个所述目标权重值位于所述目标权重数值区间之外的情况下,保持所述目标权重组的多个目标权重值的当前存储精度不变。The information processing method according to claim 3, wherein when at least one of the plurality of target weight values in the target weight group is located outside the target weight value interval, the method is maintained. The current storage accuracy of multiple target weight values in the target weight group remains unchanged.
  6. 根据权利要求3所述的信息处理方法,其中,所述当前存储精度为浮点型存储精度或者整型存储精度,所述目标存储精度的类型与所述当前存储精度的类型相同。The information processing method according to claim 3, wherein the current storage precision is a floating-point storage precision or an integer storage precision, and the type of the target storage precision is the same as the type of the current storage precision.
  7. 根据权利要求3所述的信息处理方法,其中,在所述将当前处理核的神经元与目标处理核的神经元之间的多个权重值划分为多个目标权重组的步骤之前,所述信息处理方法还包括:The information processing method according to claim 3, wherein before the step of dividing the plurality of weight values between the neurons of the current processing core and the neurons of the target processing core into a plurality of target weight groups, the Information processing methods also include:
    确定出目标权重数值区间。Determine the target weight range.
  8. 根据权利要求7所述的信息处理方法,其中,所述确定出目标权重数值区间,包括:The information processing method according to claim 7, wherein determining the target weight value interval includes:
    获取众核系统中所包含的多个权重值;Obtain multiple weight values contained in the many-core system;
    对所获取的多个权重值进行正态分布统计,确定出所述多个权重值的正态分布规律;Perform normal distribution statistics on the multiple obtained weight values, and determine the normal distribution rules of the multiple weight values;
    将所述正态分布规律中分布概率满足预设概率值的权重范围,确定为所述目标权重数值区间。The weight range in which the distribution probability in the normal distribution law satisfies the preset probability value is determined as the target weight value range.
  9. 根据权利要求3所述的信息处理方法,其中,所述将当前处理核的神经元与目标处理核的神经元之间的多个权重值划分为多个目标权重组,包括:The information processing method according to claim 3, wherein dividing the multiple weight values between the neurons of the current processing core and the neurons of the target processing core into multiple target weight groups includes:
    获取所述当前处理核的多个神经元与所述目标处理核的多个神经元之间的权重值;Obtain weight values between multiple neurons of the current processing core and multiple neurons of the target processing core;
    将所述当前处理核中的至少一个神经元所对应的所述权重值,作为一个所述目标权重组。The weight value corresponding to at least one neuron in the current processing core is used as one of the target weight groups.
  10. 根据权利要求3所述的信息处理方法,其中,所述将当前处理核的神经元与目标处理核的神经元之间的多个权重值划分为多个目标权重组,包括:The information processing method according to claim 3, wherein dividing the multiple weight values between the neurons of the current processing core and the neurons of the target processing core into multiple target weight groups includes:
    获取所述当前处理核中的多个神经元与所述目标处理核中的至少一个神经元之间的权重值;Obtain weight values between multiple neurons in the current processing core and at least one neuron in the target processing core;
    将所述当前处理核中多个神经元与所述目标处理核的至少一个神经元之间的权重值,作为一个所述目标权重组。The weight values between multiple neurons in the current processing core and at least one neuron in the target processing core are used as one of the target weight groups.
  11. 根据权利要求3所述的信息处理方法,其中,多个所述目标权重组中任意两个目标权重组之间的交集为空集。The information processing method according to claim 3, wherein the intersection between any two target weight groups among the plurality of target weight groups is an empty set.
  12. 根据权利要求1所述的信息处理方法,其中,所述待处理信息包括神经元的当前膜电位,所述目标信息包括所述神经元的静息电位,所述差异信息用于表征所述神经元的当前膜电位与所述神经元的静息电位是否相同,所述处理操作包括对所述当前膜电位的存储操作,或者,对所述当前膜电位的丢弃操作。The information processing method according to claim 1, wherein the information to be processed includes the current membrane potential of the neuron, the target information includes the resting potential of the neuron, and the difference information is used to characterize the neuron. Whether the current membrane potential of the neuron is the same as the resting potential of the neuron, the processing operation includes a storage operation on the current membrane potential, or a discarding operation on the current membrane potential.
  13. 根据权利要求12所述的信息处理方法,应用于芯片,其中,所述芯片通过其包括的至少一 个计算核模拟至少一个神经元;所述信息处理方法包括:The information processing method according to claim 12, applied to a chip, wherein the chip includes at least one Each computing core simulates at least one neuron; the information processing method includes:
    获取至少一个所述神经元的当前膜电位;obtaining the current membrane potential of at least one of said neurons;
    响应于所述当前膜电位与所述神经元的静息电位不同,关联存储所述当前膜电位与所述神经元的神经元信息;In response to the current membrane potential being different from the resting potential of the neuron, storing the neuron information of the current membrane potential and the neuron in association;
    响应于所述当前膜电位与所述静息电位相同,丢弃所述当前膜电位。In response to the current membrane potential being the same as the resting potential, the current membrane potential is discarded.
  14. 根据权利要求13所述的信息处理方法,其中,所述神经元信息包括以下至少一项:释放阈值、泄漏值、静息电位。The information processing method according to claim 13, wherein the neuron information includes at least one of the following: release threshold, leakage value, resting potential.
  15. 根据权利要求13所述的信息处理方法,其中,所述至少一个神经元的神经元信息按照神经元类型预先存储于所述芯片内;The information processing method according to claim 13, wherein the neuron information of the at least one neuron is pre-stored in the chip according to neuron type;
    所述响应于所述当前膜电位与所述神经元的静息电位不同,关联存储所述当前膜电位与所述神经元的神经元信息,包括:In response to the current membrane potential being different from the resting potential of the neuron, storing the neuron information of the current membrane potential and the neuron in association includes:
    响应于所述当前膜电位与所述神经元的静息电位不同,关联存储所述当前膜电位与所述神经元对应的神经元类型标识;In response to the current membrane potential being different from the resting potential of the neuron, storing the neuron type identifier corresponding to the current membrane potential and the neuron in association;
    所述响应于所述当前膜电位与所述静息电位相同,丢弃所述当前膜电位,包括:The step of discarding the current membrane potential in response to the current membrane potential being the same as the resting potential includes:
    响应于所述当前膜电位与所述静息电位相同,丢弃所述当前膜电位,存储所述神经元对应的神经元类型标识。In response to the current membrane potential being the same as the resting potential, the current membrane potential is discarded and the neuron type identifier corresponding to the neuron is stored.
  16. 根据权利要求13所述的信息处理方法,其中,所述信息处理方法还包括:The information processing method according to claim 13, wherein the information processing method further includes:
    响应于存储目标神经元的膜电位,将存储的所述目标神经元的膜电位确定为所述目标神经元的当前膜电位;responsive to storing the membrane potential of the target neuron, determining the stored membrane potential of the target neuron as the current membrane potential of the target neuron;
    响应于未存储目标神经元的膜电位,将所述目标神经元对应的静息电位确定为所述目标神经元的当前膜电位。In response to the membrane potential of the target neuron not being stored, the resting potential corresponding to the target neuron is determined as the current membrane potential of the target neuron.
  17. 根据权利要求13所述的信息处理方法,其中,所述至少一个神经元的神经元信息按照神经元类型预先存储于所述芯片内;所述芯片内存储有所述至少一个神经元的神经元类型标识;The information processing method according to claim 13, wherein the neuron information of the at least one neuron is pre-stored in the chip according to the neuron type; the neuron of the at least one neuron is stored in the chip. type identifier;
    所述响应于所述当前膜电位与所述神经元的静息电位不同,关联存储所述当前膜电位与所述神经元的神经元信息,包括:In response to the current membrane potential being different from the resting potential of the neuron, storing the neuron information of the current membrane potential and the neuron in association includes:
    响应于所述当前膜电位与所述神经元的静息电位不同,存储所述神经元的编号标识和所述当前膜电位,并将存储的所述编号标识和所述当前膜电位,与所述神经元的神经元类型标识相关联。In response to the current membrane potential being different from the resting potential of the neuron, storing the number identification of the neuron and the current membrane potential, and comparing the stored number identification and the current membrane potential with the associated with the neuron type identifier of the neuron in question.
  18. 根据权利要求17所述的信息处理方法,其中,所述信息处理方法还包括:The information processing method according to claim 17, wherein the information processing method further includes:
    响应于存储目标神经元的编号标识,将与所述目标神经元的编号标识关联存储的膜电位确定为所述目标神经元的当前膜电位;In response to storing the number identification of the target neuron, determining the membrane potential stored in association with the number identification of the target neuron as the current membrane potential of the target neuron;
    响应于未存储目标神经元的编号标识,将所述目标神经元对应的静息电位确定为所述目标神经元的当前膜电位。In response to the number identification of the target neuron not being stored, the resting potential corresponding to the target neuron is determined as the current membrane potential of the target neuron.
  19. 根据权利要求13-18任一所述的信息处理方法,其中,所述关联存储所述当前膜电位与所述神经元的神经元信息,包括:The information processing method according to any one of claims 13-18, wherein the associated storage of the current membrane potential and the neuron information of the neuron includes:
    基于预先设置的神经元编号标识,顺序关联存储所述当前膜电位与所述神经元的神经元信息。Based on the preset neuron number identification, the current membrane potential and the neuron information of the neuron are sequentially stored in association.
  20. 根据权利要求13所述的信息处理方法,其中,所述芯片包括众核芯片;所述神经元包括脉冲神经网络中的神经元。The information processing method according to claim 13, wherein the chip includes a many-core chip; the neurons include neurons in a spiking neural network.
  21. 一种信息处理单元,其中,包括:An information processing unit, which includes:
    处理子单元,被配置为基于神经元的待处理信息与目标信息之间的差异信息,执行所述待处理信息的处理操作;A processing subunit configured to perform a processing operation on the information to be processed based on the difference information between the information to be processed and the target information of the neuron;
    其中,所述待处理信息包括神经元的权重值,所述权重值对应的目标信息包括权重数值区间,所述处理操作包括对所述权重值调整存储精度的存储处理或者未调整存储精度的存储处理,和/或,所述待处理信息包括神经元的膜电位,所述膜电位对应的目标信息包括静息电位,所述处理操作包括对所述膜电位的存储处理或者丢弃处理。Wherein, the information to be processed includes the weight value of the neuron, the target information corresponding to the weight value includes the weight value interval, and the processing operation includes storage processing of adjusting the storage accuracy of the weight value or storage without adjusting the storage accuracy. processing, and/or, the information to be processed includes the membrane potential of the neuron, the target information corresponding to the membrane potential includes the resting potential, and the processing operation includes storage processing or discarding processing of the membrane potential.
  22. 根据权利要求21所述的信息处理单元,其中,所述处理子单元包括权重存储装置,所述权重存储装置,包括:The information processing unit according to claim 21, wherein the processing subunit includes a weight storage device, and the weight storage device includes:
    划分模块,被配置为将当前处理核的神经元与目标处理核的神经元之间的多个权重值划分为多个目标权重组,所述目标权重组包括多个目标权重值;a dividing module configured to divide multiple weight values between neurons of the current processing core and neurons of the target processing core into multiple target weight groups, where the target weight group includes multiple target weight values;
    判断模块,被配置为针对各个目标权重组,判断所述目标权重组中多个所述目标权重值是否位于目标权重数值区间内;A judgment module configured to, for each target weight group, judge whether a plurality of the target weight values in the target weight group are located within the target weight value range;
    存储模块,被配置为在所述目标权重组的多个目标权重值位于所述目标权重数值区间内的情况 下,将多个所述目标权重值按照目标存储精度进行存储,所述目标存储精度低于所述目标权重值的当前存储精度。A storage module configured to operate when multiple target weight values of the target weight group are located within the target weight value interval. , multiple target weight values are stored according to a target storage accuracy, and the target storage accuracy is lower than the current storage accuracy of the target weight value.
  23. 根据权利要求22所述的信息处理单元,其中,所述权重存储装置还包括:The information processing unit according to claim 22, wherein the weight storage device further includes:
    确定模块,被配置为在所述划分模块将当前处理核的神经元与目标处理核的神经元之间的多个权重值划分为多个目标权重组之前,确定预设权重数值区间。The determining module is configured to determine the preset weight value interval before the dividing module divides the multiple weight values between the neurons of the current processing core and the neurons of the target processing core into multiple target weight groups.
  24. 根据权利要求23所述的信息处理单元,其中,所述确定模块包括:The information processing unit according to claim 23, wherein the determining module includes:
    获取子模块,被配置为获取众核系统中所包含的多个权重值;The acquisition sub-module is configured to obtain multiple weight values contained in the many-core system;
    统计子模块,被配置为对所获取的多个权重值进行正态分布统计,确定出所述多个权重值的正态分布规律;The statistics submodule is configured to perform normal distribution statistics on the multiple weight values obtained, and determine the normal distribution law of the multiple weight values;
    确定子模块,被配置为将所述正态分布规律中分布概率满足预设概率值的权重范围,确定为所述目标权重数值区间。The determination sub-module is configured to determine the weight range in which the distribution probability in the normal distribution law satisfies the preset probability value as the target weight value range.
  25. 根据权利要求21所述的信息处理单元,应用于芯片,其中,所述芯片通过其包括的至少一个计算核模拟至少一个神经元,所述信息处理单元包括神经元信息处理装置;所述神经元信息处理装置包括:The information processing unit according to claim 21, applied to a chip, wherein the chip simulates at least one neuron through at least one computing core it includes, the information processing unit includes a neuron information processing device; the neuron Information processing devices include:
    获取模块,被配置为获取至少一个所述神经元的当前膜电位;an acquisition module configured to acquire the current membrane potential of at least one of the neurons;
    存储模块,被配置为响应于所述当前膜电位与所述神经元的静息电位不同,关联存储所述当前膜电位与所述神经元的神经元信息;以及,响应于所述当前膜电位与所述静息电位相同,丢弃所述当前膜电位。a storage module configured to associate and store the current membrane potential with the neuron information of the neuron in response to the current membrane potential being different from the resting potential of the neuron; and, in response to the current membrane potential Identical to the resting potential, the current membrane potential is discarded.
  26. 一种芯片,其中,所述芯片通过其包括的至少一个计算核模拟至少一个神经元;其中,A chip, wherein the chip simulates at least one neuron through at least one computing core it includes; wherein,
    所述计算核,被配置为基于神经元的待处理信息与目标信息之间的差异信息,执行所述待处理信息的处理操作;The computing core is configured to perform a processing operation on the information to be processed based on the difference information between the information to be processed and the target information of the neuron;
    其中,所述待处理信息包括神经元的权重值,所述权重值对应的目标信息包括权重数值区间,所述处理操作包括对所述权重值调整存储精度的存储处理或者未调整存储精度的存储处理,和/或,Wherein, the information to be processed includes the weight value of the neuron, the target information corresponding to the weight value includes the weight value interval, and the processing operation includes storage processing of adjusting the storage accuracy of the weight value or storage without adjusting the storage accuracy. processing, and/or,
    所述待处理信息包括神经元的膜电位,所述膜电位对应的目标信息包括静息电位,所述处理操作包括对所述膜电位的存储处理或者丢弃处理。The information to be processed includes the membrane potential of the neuron, the target information corresponding to the membrane potential includes the resting potential, and the processing operation includes storage processing or discarding processing of the membrane potential.
  27. 根据权利要求26所述的芯片,其中,所述计算核,被配置为获取至少一个所述神经元的当前膜电位;响应于所述当前膜电位与所述神经元的静息电位不同,关联存储所述当前膜电位与所述神经元的神经元信息;响应于所述当前膜电位与所述静息电位相同,丢弃所述当前膜电位。The chip according to claim 26, wherein the computing core is configured to obtain the current membrane potential of at least one of the neurons; in response to the current membrane potential being different from the resting potential of the neuron, associate The current membrane potential and neuronal information of the neuron are stored; in response to the current membrane potential being the same as the resting potential, the current membrane potential is discarded.
  28. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至20中任一所述的信息处理方法。An electronic device, including a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the computer program, any one of claims 1 to 20 is implemented The information processing method described.
  29. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现如权利要求1至20中任一所述的信息处理方法。A computer-readable storage medium with a computer program stored thereon, characterized in that when the computer program is executed by a processor, the information processing method as claimed in any one of claims 1 to 20 is implemented.
  30. 一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,其中,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行用于实现如权利要求1至20中的任一项所述的信息处理方法。 A computer program product comprising computer readable code, or a non-volatile computer readable storage medium carrying the computer readable code, wherein when the computer readable code is executed in a processor of an electronic device, the The processor in the electronic device executes the information processing method according to any one of claims 1 to 20.
PCT/CN2023/091515 2022-04-29 2023-04-28 Information processing method and unit, chip, device, medium, and product WO2023208178A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202210468928.7 2022-04-29
CN202210473210.7A CN114742213A (en) 2022-04-29 2022-04-29 Neuron information processing method, device, chip and storage medium
CN202210473210.7 2022-04-29
CN202210468928.7A CN114792129A (en) 2022-04-29 2022-04-29 Weight storage method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
WO2023208178A1 true WO2023208178A1 (en) 2023-11-02

Family

ID=88517964

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/091515 WO2023208178A1 (en) 2022-04-29 2023-04-28 Information processing method and unit, chip, device, medium, and product

Country Status (1)

Country Link
WO (1) WO2023208178A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170185890A1 (en) * 2015-12-28 2017-06-29 International Business Machines Corporation Digitial stdp synapse and lif neuron-based neuromorphic system
CN113196233A (en) * 2018-12-19 2021-07-30 ams有限公司 Implementing a multi-layer neural network with a single physical layer that simulates neurons
CN113673688A (en) * 2021-08-24 2021-11-19 北京灵汐科技有限公司 Weight generation method, data processing method and device, electronic device and medium
CN113688988A (en) * 2021-08-30 2021-11-23 北京灵汐科技有限公司 Precision adjustment method and device, and storage medium
CN114091652A (en) * 2021-11-05 2022-02-25 上海新氦类脑智能科技有限公司 Impulse neural network model training method, processing chip and electronic equipment
CN114742213A (en) * 2022-04-29 2022-07-12 北京灵汐科技有限公司 Neuron information processing method, device, chip and storage medium
CN114792129A (en) * 2022-04-29 2022-07-26 北京灵汐科技有限公司 Weight storage method and device, electronic equipment and computer readable medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170185890A1 (en) * 2015-12-28 2017-06-29 International Business Machines Corporation Digitial stdp synapse and lif neuron-based neuromorphic system
CN113196233A (en) * 2018-12-19 2021-07-30 ams有限公司 Implementing a multi-layer neural network with a single physical layer that simulates neurons
CN113673688A (en) * 2021-08-24 2021-11-19 北京灵汐科技有限公司 Weight generation method, data processing method and device, electronic device and medium
CN113688988A (en) * 2021-08-30 2021-11-23 北京灵汐科技有限公司 Precision adjustment method and device, and storage medium
CN114091652A (en) * 2021-11-05 2022-02-25 上海新氦类脑智能科技有限公司 Impulse neural network model training method, processing chip and electronic equipment
CN114742213A (en) * 2022-04-29 2022-07-12 北京灵汐科技有限公司 Neuron information processing method, device, chip and storage medium
CN114792129A (en) * 2022-04-29 2022-07-26 北京灵汐科技有限公司 Weight storage method and device, electronic equipment and computer readable medium

Similar Documents

Publication Publication Date Title
US11907760B2 (en) Systems and methods of memory allocation for neural networks
CN110837410B (en) Task scheduling method and device, electronic equipment and computer readable storage medium
CN108595157B (en) Block chain data processing method, device, equipment and storage medium
WO2022042123A1 (en) Image recognition model generation method and apparatus, computer device and storage medium
US20240020514A1 (en) Improper neural network input detection and handling
CN109710406B (en) Data distribution and model training method and device thereof, and computing cluster
US10481817B2 (en) Methods and apparatus to optimize dynamic memory assignments in multi-tiered memory systems
WO2021143370A1 (en) Method and device for processing resource data
CN110381151A (en) A kind of warping apparatus detection method and device
TWI713019B (en) Data label generation, model training, event recognition method and device
WO2023208178A1 (en) Information processing method and unit, chip, device, medium, and product
CN116610731B (en) Big data distributed storage method and device, electronic equipment and storage medium
CN109800085A (en) Detection method, device, storage medium and the electronic equipment of resource distribution
CN111079930B (en) Data set quality parameter determining method and device and electronic equipment
WO2021227789A1 (en) Storage space allocation method and device, terminal, and computer readable storage medium
WO2023015615A1 (en) Multi-channel fund transfer method and apparatus based on prediction model, and device and medium
CN114742213A (en) Neuron information processing method, device, chip and storage medium
CN111984744B (en) Information processing method based on remote communication and artificial intelligence and cloud service platform
CN114792129A (en) Weight storage method and device, electronic equipment and computer readable medium
JP2023544022A (en) Group type identification methods, devices, computer equipment and computer programs
CN112988383A (en) Resource allocation method, device, equipment and storage medium
CN112464101A (en) Electronic book sorting recommendation method, electronic device and storage medium
CN112541834A (en) Identifier processing method, device and system for hydropower industry digital object
CN111984714B (en) Information generation method based on intelligent online communication and big data and cloud service platform
CN116385156B (en) Resource allocation method, apparatus, computer device and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23795610

Country of ref document: EP

Kind code of ref document: A1