WO2017124646A1 - 一种用于稀疏连接的人工神经网络计算装置和方法 - Google Patents

一种用于稀疏连接的人工神经网络计算装置和方法 Download PDF

Info

Publication number
WO2017124646A1
WO2017124646A1 PCT/CN2016/078545 CN2016078545W WO2017124646A1 WO 2017124646 A1 WO2017124646 A1 WO 2017124646A1 CN 2016078545 W CN2016078545 W CN 2016078545W WO 2017124646 A1 WO2017124646 A1 WO 2017124646A1
Authority
WO
WIPO (PCT)
Prior art keywords
input
output
neural network
connection
artificial neural
Prior art date
Application number
PCT/CN2016/078545
Other languages
English (en)
French (fr)
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
Application filed by 北京中科寒武纪科技有限公司 filed Critical 北京中科寒武纪科技有限公司
Priority to KR1020187018866A priority Critical patent/KR102163561B1/ko
Priority to EP16885910.6A priority patent/EP3407266B1/en
Priority to KR1020187015437A priority patent/KR102142889B1/ko
Priority to KR1020187018864A priority patent/KR102166775B1/ko
Publication of WO2017124646A1 publication Critical patent/WO2017124646A1/zh
Priority to US15/975,065 priority patent/US20180260709A1/en
Priority to US15/975,083 priority patent/US20180260711A1/en
Priority to US15/975,075 priority patent/US20180260710A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3802Instruction prefetching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3885Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units
    • G06F9/3887Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units controlled by a single instruction for multiple data lanes [SIMD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0495Quantised networks; Sparse networks; Compressed networks
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/38Indexing scheme relating to groups G06F7/38 - G06F7/575
    • G06F2207/48Indexing scheme relating to groups G06F7/48 - G06F7/575
    • G06F2207/4802Special implementations
    • G06F2207/4818Threshold devices
    • G06F2207/4824Neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/544Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation
    • G06F7/5443Sum of products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30145Instruction analysis, e.g. decoding, instruction word fields

Definitions

  • the present invention relates to the field of data processing technologies, and more particularly to an artificial neural network computing apparatus and method for sparse connection.
  • Neural Networks are simply referred to as Neural Networks (NNs), which is an algorithmic mathematical model that mimics the behavioral characteristics of animal neural networks and performs distributed parallel information processing. This kind of network relies on the complexity of the system, and adjusts the interconnection relationship between a large number of internal nodes to achieve the purpose of processing information.
  • the algorithm used by neural networks is vector multiplication, and symbolic functions and their various approximations are widely used.
  • the neural network consists of a number of interconnected nodes, as shown in Figure 1. Each circle represents a neuron, and each arrow represents the connection between two neurons. value.
  • x represents all input neurons connected to the output neurons and w represents the corresponding weight between x and the output neurons.
  • f(x) is a nonlinear function, usually called an activation function. Common functions are: Wait.
  • Neural networks are widely used in a variety of application scenarios: computational vision, speech recognition, and natural language processing.
  • the scale of neural networks has been growing.
  • Lecun's neural network for handwritten character recognition was less than 1M in weight; in 2012, krizhevsky used to participate in the ImageNet competition with a scale of 60M weights.
  • the neural network is a high-calculation and high-access application.
  • a sparsely connected neural network appears, as shown in Figure 2, which is a sparse neural network.
  • a general-purpose processor is usually used in the prior art to calculate a sparse artificial neural network.
  • input neurons, lose Outgoing neurons and weights are stored in three arrays, respectively, and there is also an indexed array that stores the connection between each output and the input connection.
  • the main operation is the multiplication of neurons with weights. Since the weight and the neuron are not one-to-one correspondence, each operation must find the weight corresponding to the neuron through the index array. Due to the weak computing power and memory access of general-purpose processors, the needs of neural networks cannot be met. When multiple general-purpose processors are executed in parallel, communication between the general-purpose processors becomes a performance bottleneck.
  • each multiplication operation has to go to the index array to re-find the position corresponding to the weight, which increases the additional computation and memory overhead. Therefore, the calculation of the neural network takes a long time and consumes a lot of power.
  • the general-purpose processor needs to decode the multi-layer artificial neural network into a long column operation and a fetch instruction sequence, and the processor front-end decoding brings a large power consumption overhead.
  • Another known method of supporting sparsely connected artificial neural network operations and their training algorithms is to use a graphics processing unit (GPU) that supports the above algorithms by executing general SIMD instructions using a general purpose register file and a generic stream processing unit.
  • the GPU is a device specially used for performing graphic image operations and scientific calculations, without special support for sparse artificial neural network operations, a large amount of front-end decoding work is still required to perform sparse artificial neural network operations, resulting in a large number of The extra overhead.
  • the GPU has only a small on-chip buffer.
  • the model data (weight) of the multi-layer artificial neural network needs to be repeatedly transferred from off-chip.
  • the off-chip bandwidth becomes the main performance bottleneck, and brings huge power consumption overhead.
  • the present invention provides an artificial neural network computing apparatus for sparse connection, comprising:
  • mapping unit configured to convert the input data into a storage manner in which the input neurons and the weights are in one-to-one correspondence, and stored in the storage device and/or the cache;
  • a storage device for storing data and instructions
  • An operation unit configured to perform a phase on the data according to an instruction stored in the storage device
  • the operation unit performs the three-step operation, the first step is to multiply the input neuron and the weight data; the second step is to perform an addition tree operation for the weighted output after the first step of processing
  • the neurons are added step by step through the addition tree, or the output neurons are added by the offset and the bias is added to obtain the biased output neurons; the third step is to perform an activation function operation to obtain the final output neurons.
  • mapping unit The one-to-one correspondence in the mapping unit is expressed as:
  • the first case is a first case:
  • the second case is a first case
  • the present invention also provides a calculation method for a sparsely connected artificial neural network, comprising the following steps:
  • Step 1 Convert the input data into a storage mode in which the input neurons and the weights are in one-to-one correspondence; wherein the correspondence relationship is expressed as:
  • the first case is a first case:
  • the second case is a first case
  • Step 2 multiplying the input neuron and the weight data
  • Step 3 performing an addition tree operation, adding the weighted output neurons processed in the first step to the stages by the addition tree, or adding the output neurons through the offsets to obtain the biased output neurons;
  • Step 4 Perform an activation function operation to obtain a final output neuron; wherein the activation function is a sigmoid function, a tanh function, or a ReLU function.
  • the artificial neural network computing device and method of the present invention have the following beneficial effects:
  • 1 is a schematic diagram of a node structure of a neural network
  • FIG. 2 is a schematic diagram of a node structure of a sparsely connected neural network
  • Figure 3 is a schematic block diagram showing the overall structure of an embodiment of the present invention.
  • FIG. 4 is a schematic diagram showing a node structure of a sparsely connected neural network as an embodiment of the present invention
  • Figure 5 is a schematic diagram showing the connection relationship of the neural network of Figure 4.
  • FIG. 6 is a schematic diagram showing a connection relationship of a sparsely connected neural network as another embodiment of the present invention.
  • Figure 7 is a schematic illustration of a convolution operation as an embodiment of the present invention.
  • Figure 8 is a graph showing changes in input, output, and weight when the convolutional neural network becomes sparse
  • FIG. 9 is a schematic structural diagram of a sparsely connected artificial neural network computing device as an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a mapping unit as an embodiment of the present invention.
  • FIG. 11 is a flow chart showing an operation procedure of a sparsely connected artificial neural network as an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of a sparsely connected artificial neural network computing device as another embodiment of the present invention.
  • FIG. 13 is a schematic structural diagram of a mapping unit as another embodiment of the present invention.
  • FIG. 14 is a schematic structural diagram of a sparsely connected artificial neural network computing device according to still another embodiment of the present invention.
  • mapping unit 15 is a schematic structural diagram of a mapping unit as still another embodiment of the present invention.
  • 16 is a schematic structural diagram of a sparsely connected artificial neural network computing device as still another embodiment of the present invention.
  • Figure 17 is a block diagram showing the structure of a mapping unit as still another embodiment of the present invention.
  • the invention discloses an artificial neural network computing device for sparse connection, comprising:
  • mapping unit configured to convert the input data into a storage manner in which the input neurons and the weights are in one-to-one correspondence, and stored in the storage device or the cache;
  • a storage device for storing data and instructions
  • An operation unit configured to perform a corresponding operation on the data according to an instruction stored in the storage device; the operation unit mainly performs a three-step operation, and the first step is to multiply the input neuron and the weight data;
  • the two-step performing addition tree operation is used to add the weighted output neurons processed in the first step by the addition tree step by step, or add the output neurons through the offset and the offset to obtain the biased output neurons; Perform an activation function operation to get the final output neuron.
  • mapping unit The one-to-one correspondence in the mapping unit is expressed as follows:
  • the first case is a first case:
  • the second case is a first case
  • said artificial neural network computing device further comprises a DMA for reading or writing data or instructions in said storage device and cache.
  • the artificial neural network computing device further comprises:
  • Instruction cache for storing dedicated instructions
  • control unit configured to read the dedicated instruction from the instruction cache and decode the instruction into each operation unit instruction.
  • the artificial neural network computing device further comprises:
  • Input a neuron cache for buffering input neuron data input to the arithmetic unit
  • Weight buffer for caching weight data
  • the artificial neural network computing device further comprises:
  • Output a neuron cache for buffering output neurons output by the arithmetic unit.
  • the mapping unit is configured to convert the input data into a storage manner in which the input neurons and the weights are in one-to-one correspondence, and output to the operation unit instead of being stored in the storage device.
  • said artificial neural network computing device further comprises an input neuron cache and/or a weight buffer, said input neuron buffer for buffering input neuron data input to said arithmetic unit, said weight buffering For buffering weight data, the mapping unit is used to convert The incoming data is converted into a storage manner in which the input neurons and the weights are in one-to-one correspondence, and output to the input neuron cache and/or the weight buffer.
  • the activation function performed by the arithmetic unit in the third step is a sigmoid function, a tanh function or a ReLU function.
  • the invention also discloses a calculation method for an artificial neural network for sparse connection, comprising the following steps:
  • Step 1 Convert the input data into a storage mode in which the input neurons and the weights are in one-to-one correspondence; wherein the correspondence relationship is expressed as:
  • the first case is a first case:
  • the second case is a first case
  • Step 2 multiplying the input neuron and the weight data
  • Step 3 performing an addition tree operation, adding the weighted output neurons processed in the first step to the stages by the addition tree, or adding the output neurons through the offsets to obtain the biased output neurons;
  • Step 4 Perform an activation function operation to obtain a final output neuron; wherein the activation function is a sigmoid function, a tanh function, or a ReLU function.
  • FIG. 3 is a schematic block diagram of the overall structure in accordance with one embodiment of the present invention.
  • I/O interface 1 for I/O data, needs to be sent to the sparse multi-layer artificial neural network computing device via CPU3, and then written to the storage device by sparse multi-layer artificial neural network computing device 4, sparse multi-layer artificial nerve
  • the dedicated program required by the network computing device 4 is also transmitted by the CPU 3 to the sparse multilayer artificial neural network computing device 4.
  • the storage device 2 is used to temporarily store sparse multi-layer artificial neural network models and neuron data, especially when all models cannot be dropped in the cache on the sparse multi-layer artificial neural network computing device 4.
  • the central processing unit CPU 3 is used for basic control such as data transfer and sparse multi-layer artificial neural network computing device 4 to start and stop, and serves as an interface between the sparse multilayer artificial neural network computing device 4 and external control.
  • the sparse artificial neural network operation device 4 is configured to execute a sparse multi-layer artificial neural network operation unit, receive data and programs from the CPU 3, execute the sparse multi-layer artificial neural network operation algorithm, and sparse artificial neural network operation device 4 The result of the execution will be transferred back to CPU3.
  • the sparse artificial neural network operation device 4 is used as a coprocessor of the CPU 3 or the GPU to execute a sparse multi-layer artificial neural network operation algorithm.
  • a system structure in which a plurality of sparse artificial neural network computing devices are interconnected a plurality of sparse artificial neural network computing devices 4 can be interconnected through a PCIE bus to support larger-scale sparse multi-layer artificial neural network operations, and can share the same host
  • the CPUs either have their own host CPUs and can share memory or each accelerator has its own memory.
  • the interconnection method can be any interconnection topology.
  • a sparsely connected neural network there are four input neurons: i 1 , i 2 , i 3 , i 4 , with 2 output neurons: o 1 , o 2 .
  • o 1 and i 1 , i 3 , i 4 are connected, and the weights of the connections are represented as w 11 , w 31 , w 41 , o 2 and i 2 , i 3 are connected, and the weights of the connections are respectively Expressed as w 22 , w 32 .
  • connection relationship of the sparse neural network There are two ways to represent the connection relationship of the sparse neural network above. One is to use one bit between each input and output neuron to indicate whether there is a connection, and the other is to use the distance between the connections to represent each connection. s position.
  • the first connection means :
  • connection relationship of the output neurons o 1 is: 1011, each bit indicates whether there is a connection with the input, 1 indicates that there is a connection, 0 indicates no connection, and the output neuron o
  • the connection relationship of 2 is 0110. In the operation, the input neurons corresponding to the connection relationship of 0 will not be operated.
  • connection relationship When the connection relationship is stored, the connection relationship can be stored in the order of priority input or output neurons.
  • the specific storage formats are as follows:
  • Format 1 Place all the inputs of each output one after the other. The above example is placed in the order of 10110110.
  • Format 2 Place all the outputs of each input in order.
  • the order of the above example is 10011110.
  • the second connection means is a first connection means
  • the output neuron o 1 is connected to the input neurons i 1 , i 3 , i 4 , then the connection relationship is 0 , 2 , 1.
  • 0 indicates the position distance of the first connection.
  • the distance of one input neuron is 0, which is the first input neuron, and 2 indicates that the distance of the second input neuron from the previous input neuron is 2, which means the third input neuron, and 1 represents the third.
  • the distance of the input neurons from the previous input neuron is 1, which represents the fourth input neuron.
  • the connection relationship of o 2 is 1,1.
  • the mapping unit of the present invention includes, but is not limited to, the above connection relationship.
  • a convolutional neural network is a type of artificial neural network.
  • the convolutional layer contains a plurality of filters, that is, convolution kernels. These convolution kernels are repeatedly applied to all input images to extract local features. Different convolution kernels can extract different kinds of local features, and an input image becomes an abstract feature that can be better understood after passing through the convolution layer.
  • Natural images have their inherent characteristics, that is, the statistical properties of a part of an image are the same as other parts. This also means that the features learned in this part can also be used in another part, so the same learning characteristics can be used for all positions on this image.
  • the features learned from this 8*8 sample can be used as a probe. Apply to any part of this image. In particular, you can use the features learned from the 8*8 samples to convolute with the original large-size image, thus making this large rule An arbitrary value of a different feature is obtained anywhere on the inch image.
  • This 8*8 sample feature is called a convolution kernel.
  • Figure 7 is an example of a convolution operation.
  • the convolution kernel is a 2*2 matrix, and the convolution kernel slides over the input image.
  • the convolution kernel matrix is multiplied and added with the corresponding input image data.
  • the input of the neural element is needed i 0, i 1, i 3 , i 4, the input weight is: w 0, w 3, 1001, or 0,2 connection relationship;
  • the required input neurons are i 3 , i 5 , i 7 , i 8 , and the input weights are: w 0 , w 3 , and the connection relationship is 1001 or 0, 2.
  • An artificial neural network computing device that can perform sparse connections can process sparsely connected artificial neural networks of various sparsely connected representations, and an artificial neural network computing device that can perform sparse connections has a unit dedicated to processing sparse connections, which is referred to herein.
  • the mapping unit the structure of the sparsely connected artificial neural network computing device will be slightly different for different sparse connection relationships and processing methods, and different structures and methods will be separately described below.
  • the mapping unit 1 is configured to convert the input data into a storage manner in which the input neurons and the weights are in one-to-one correspondence.
  • the storage device 2 is configured to store data and instructions. Especially when the neural network is very large, the instruction cache 4, the input neuron cache 6, the output neuron cache 9, and the weight buffer 8 cannot put so much data, and only The data is temporarily stored in the storage device 2.
  • DMA3 is used to move data or instructions in the storage device to each cache.
  • Instruction cache 4 is used to store dedicated instructions.
  • the control unit 5 reads the dedicated instruction from the instruction buffer 4 and decodes it into each arithmetic unit instruction.
  • the input neuron cache 6 is used to store the input neuron data of the operation.
  • the operation unit 7 is configured to perform a specific operation.
  • the arithmetic unit is mainly divided into three stages, and the first stage performs a multiplication operation for multiplying the input neurons and weight data.
  • the second stage performs the addition tree operation, and the first and second stages are combined to complete the vector inner product operation.
  • the third stage performs an activation function operation, and the activation function may be a sigmoid function, a tanh function, or the like.
  • the third stage gets the output neurons and writes back to the output neuron cache.
  • the weight buffer 8 is used to store weight data.
  • the output neuron cache 9 is used to store the output neurons of the operation.
  • mapping unit The structure of the mapping unit is as shown in FIG.
  • connection relationship may be one of the two sparse representations described above, and the mapping unit outputs the mapped neurons and weights according to the connection relationship according to the connection relationship.
  • the mapped neurons and weights can be used directly during the operation without considering the connection relationship.
  • the specific process for outputting the neuron o1 mapping is as follows:
  • the input neurons are: i 1 , i 2 , i 3 , i 4 , and the input weights are: w 11 , w 31 , w 41 , and the connection relationship can be: 1011, or 0, 2, 1.
  • the mapping unit changes the input neurons and the weights into corresponding relationships according to the connection relationship.
  • the output has two cases: one is to remove the input neurons that are not connected, and the mapped neurons are i 1 , i 3 , i 4 , the weights after mapping are w 11 , w 31 , w 41 ; the other is that the weights are added to 0 where there is no connection, then the mapped neurons are i 1 , i 2 , i 3 , i 4 , the weights after mapping are w 11 , 0, w 31 , w 41 .
  • the arithmetic unit is mainly divided into three parts, a first part multiplier, a second part addition tree, and a third part is a linear function unit.
  • the first part multiplies the input neuron (in) by the weight (w) to obtain the weighted output neuron (out).
  • the storage device 1 is used to store data and instructions. Especially when the neural network is very large, the instruction cache 3, the input neuron cache 6, the output neuron cache 9, and the weight buffer 8 cannot be placed. With multiple data, data can only be temporarily stored in the storage device 1.
  • DMA2 is used to move data or instructions in the storage device to each cache.
  • Instruction cache 3 is used to store dedicated instructions.
  • the control unit 4 reads the dedicated instruction from the instruction buffer 3 and decodes it into each arithmetic unit instruction.
  • the mapping unit 5 is configured to convert the input data into a storage manner in which the input neurons and the weights are in one-to-one correspondence.
  • the input neuron cache 6 is used to store the input neuron data of the operation.
  • the operation unit 7 is configured to perform a specific operation.
  • the arithmetic unit is mainly divided into three stages, and the first stage performs a multiplication operation for multiplying the input neurons and weight data.
  • the second stage performs the addition tree operation, and the first and second stages are combined to complete the vector inner product operation.
  • the third stage performs an activation function operation, and the activation function may be a sigmoid function, a tanh function, or the like.
  • the third stage gets the output neurons and writes back to the output neuron cache.
  • the weight buffer 8 is used to store weight data.
  • the output neuron cache 9 is used to store the output neurons of the operation.
  • mapping unit The structure of the mapping unit is as shown in FIG.
  • connection relationship may be one of the two sparse representations described above, and the mapping unit outputs the mapped neurons and weights according to the connection relationship according to the connection relationship.
  • the mapped neurons and weights can be used directly during the operation without considering the connection relationship.
  • the specific process for outputting the neuron o1 mapping is as follows:
  • the input neurons are: i 1 , i 2 , i 3 , i 4 , and the input weights are: w 11 , w 31 , w 41 , and the connection relationship can be: 1011, or 0, 2, 1.
  • the mapping unit changes the input neurons and the weights into corresponding relationships according to the connection relationship.
  • the output has two cases: one is to remove the input neurons that are not connected, and the mapped neurons are i 1 , i 3 , i 4 , the weights after mapping are w 11 , w 31 , w 41 ; the other is that the weights are added to 0 where there is no connection, then the mapped neurons are i 1 , i 2 , i 3 , i 4 , the weights after mapping are w 11 , 0, w 31 , w 41 .
  • mapping unit in Structure 1 and Structure 2 The main difference between the mapping unit in Structure 1 and Structure 2 is that the mapping unit in Structure and Method 1 is stored in the storage device before mapping the input neurons and weights before calculation.
  • the structure and method are Mapping is performed in the calculation, and the mapped data is directly calculated to the arithmetic unit.
  • a slight modification based on the structure and method 2 can be changed to the structure shown in FIG. 14, and the mapping unit only maps the input neurons.
  • the input neurons are: i 1 , i 2 , i 3 , i 4 , and the connection relationship can be: 1011, or: 0, 2, 1.
  • the mapping unit changes the input neuron and the weight into a corresponding relationship according to the connection relationship, and removes the input neurons that are not connected, and the mapped neurons are i 1 , i 3 , i 4 .
  • a slight modification based on the structure and method 2 can be changed to the structure shown in FIG. 16, and the mapping unit only maps the input weights.
  • the input weights are: w 11 , w 31 , w 41 , and the connection relationship can be: 1011, or: 0, 2, 1.
  • the mapping unit changes the input neuron and the weight into a corresponding relationship according to the connection relationship, and the mapped weights are w 11 , 0, w 31 , w 41 .

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Neurology (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Image Analysis (AREA)
  • Memory System (AREA)
  • Devices For Executing Special Programs (AREA)
  • Machine Translation (AREA)
  • Complex Calculations (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种用于稀疏连接的人工神经网络计算装置,包括:映射单元(5),用于将输入数据转换成输入神经元和权值一一对应的存储方式;存储装置(1),用于存储数据和指令;运算单元(7),用于根据指令对数据执行相应运算;所述运算单元主要执行三步运算,第一步将输入的神经元和权值数据相乘;第二步执行加法树运算,将第一步处理后的加权输出神经元通过加法树逐级相加,或将输出神经元通过和偏置相加得到加偏置输出神经元;第三步执行激活函数运算,得到最终输出神经元。该装置解决了CPU和GPU运算性能不足,前端译码开销大的问题,有效提高了对多层人工神经网络运算算法的支持,避免了内存带宽成为多层人工神经网络运算及其训练算法性能瓶颈的问题。

Description

一种用于稀疏连接的人工神经网络计算装置和方法 技术领域
本发明涉及数据处理技术领域,更具体地涉及一种用于稀疏连接的人工神经网络计算装置和方法。
背景技术
人工神经网络(Artificial Neural Networks,ANNs)简称为神经网络(NNs),它是一种模仿动物神经网络行为特征,进行分布式并行信息处理的算法数学模型。这种网络依靠***的复杂程度,通过调整内部大量节点之间的相互连接关系,从而达到处理信息的目的。神经网络用到的算法就是向量乘法,并且广泛采用符号函数及其各种逼近。
就像大脑里的神经网络一样,神经网络由一些互相连接的节点组成,如图1所示,每个圆圈表示一个神经元,每个箭头表示两个神经元之间的连接又被称为权值。
神经元的计算公式可以简单的描述成:
Figure PCTCN2016078545-appb-000001
其中,x表示所有和输出神经元相连接的输入神经元,w表示x和输出神经元之间对应的权值。f(x)是一个非线性函数,通常称作激活函数,常用的函数如:
Figure PCTCN2016078545-appb-000002
等。
神经网络被广泛应用于各种应用场景:计算视觉、语音识别和自然语言处理等。在近几年的时间里,神经网络的规模一直在增长。在1998年,Lecun用于手写字符识别的神经网络的规模小于1M个权值;在2012年,krizhevsky用于参加ImageNet竞赛的规模是60M个权值。
神经网络是一个高计算量和高访存的应用,权值越多,计算量和访存量都会增大。为了减小计算量和权值数量,从而降低访存量,出现了稀疏连接的神经网络,如图2所示即为一个稀疏的神经网络。
随着神经网络计算量和访存量的急剧增大,现有技术中通常采用通用处理器计算稀疏的人工神经网络。对于通用处理器,输入神经元、输 出神经元和权重分别存储在三个数组中,同时还有一个索引数组,索引数组存储了每个输出和输入连接的连接关系。在计算时,主要的运算是神经元与权值相乘。由于权值和神经元不是一一对应的关系,所以每一次运算都要通过索引数组找到神经元对应的权值。由于通用处理器计算能力和访存能力都很弱,满足不了神经网络的需求。而多个通用处理器并行执行时,通用处理器之间相互通讯又成为了性能瓶颈。在计算剪枝之后的神经网络时,每次乘法运算都要去索引数组里重新查找权值对应的位置,增加了额外的计算量和访存开销。因此计算神经网络耗时长,功耗高。通用处理器需要把多层人工神经网络运算译码成一长列运算及访存指令序列,处理器前端译码带来了较大的功耗开销。
另一种支持稀疏连接的人工神经网络运算及其训练算法的已知方法是使用图形处理器(GPU),该方法通过使用通用寄存器堆和通用流处理单元执行通用SIMD指令来支持上述算法。但由于GPU是专门用来执行图形图像运算以及科学计算的设备,没有对稀疏的人工神经网络运算的专门支持,仍然需要大量的前端译码工作才能执行稀疏的人工神经网络运算,带来了大量的额外开销。另外GPU只有较小的片上缓存,多层人工神经网络的模型数据(权值)需要反复从片外搬运,片外带宽成为了主要性能瓶颈,同时带来了巨大的功耗开销。
发明内容
有鉴于此,本发明的目的在于提供一种用于稀疏连接的人工神经网络计算装置和方法。
为了实现上述目的,作为本发明的一个方面,本发明提供了一种用于稀疏连接的人工神经网络计算装置,包括:
映射单元,用于将输入数据转换成输入神经元和权值一一对应的存储方式,并存储在存储装置和/或缓存中;
存储装置,用于存储数据和指令;
运算单元,用于根据所述存储装置中存储的指令对所述数据执行相 应的运算;所述运算单元主要执行三步运算,第一步是将所述输入神经元和权值数据相乘;第二步执行加法树运算,用于将第一步处理后的加权输出神经元通过加法树逐级相加,或者将输出神经元通过和偏置相加得到加偏置输出神经元;第三步执行激活函数运算,得到最终输出神经元。
其中,所述映射单元中的一一对应关系表示为:
第一种情形:
采用1表示有连接,0表示无连接,每个输出与所有输入的连接状态组成一个0和1的字符串来表示该输出的连接关系;或者
采用1表示有连接,0表示无连接,每个输入与所有输出的连接状态组成一个0和1的字符串来表示该输入的连接关系;
第二种情形:
将一输出第一个连接所在的位置距离第一个输入神经元的距离、所述输出第二个输入神经元距离上一个输入神经元的距离,所述输出第三个输入神经元距离上一个输入神经元的距离,……,依次类推,直到穷举所述输出的所有输入,来表示所述输出的连接关系。
作为本发明的另一个方面,本发明还提供了一种用于稀疏连接的人工神经网络的计算方法,包括以下步骤:
步骤1,将输入数据转换成输入神经元和权值一一对应的存储方式;其中,所述对应关系表示为:
第一种情形:
采用1表示有连接,0表示无连接,每个输出与所有输入的连接状态组成一个0和1的字符串来表示该输出的连接关系;或者
采用1表示有连接,0表示无连接,每个输入与所有输出的连接状态组成一个0和1的字符串来表示该输入的连接关系;
第二种情形:
将一输出第一个连接所在的位置距离第一个输入神经元的距离、所述输出第二个输入神经元距离上一个输入神经元的距离,所述输出第三个输入神经元距离上一个输入神经元的距离,……,依次类推,直到穷 举所述输出的所有输入,来表示所述输出的连接关系
步骤2,将输入的神经元和权值数据相乘;
步骤3,执行加法树运算,将第一步处理后的加权输出神经元通过加法树逐级相加,或者将输出神经元通过和偏置相加得到加偏置输出神经元;
步骤4,执行激活函数运算,得到最终输出神经元;其中,所述激活函数为sigmoid函数、tanh函数或ReLU函数。
基于上述技术方案可知,本发明的人工神经网络计算装置和方法具有以下有益效果:
(1)通过采用针对稀疏的多层人工神经网络运算的专用SIMD指令和定制的运算单元,解决了CPU和GPU运算性能不足,前端译码开销大的问题,有效提高了对多层人工神经网络运算算法的支持;
(2)通过采用针对多层人工神经网络运算算法的专用片上缓存,充分挖掘了输入神经元和权值数据的重用性,避免了反复向内存读取这些数据,降低了内存访问带宽,避免了内存带宽成为多层人工神经网络运算及其训练算法性能瓶颈的问题。
附图说明
图1是神经网络的节点结构示意图;
图2是稀疏连接的神经网络的节点结构示意图;
图3是作为本发明一实施例的总体结构的示意性框图;
图4是作为本发明一实施例的一稀疏连接的神经网络的节点结构示意图;
图5是图4的神经网络的连接关系示意图;
图6是作为本发明又一实施例的一稀疏连接的神经网络的连接关系示意图;
图7是作为本发明一实施例的一卷积操作的示意图;
图8是卷积神经网络变得稀疏时输入、输出和权值的变化图;
图9是作为本发明一实施例的稀疏连接的人工神经网络运算装置的结构示意图;
图10是作为本发明一实施例的映射单元的结构示意图;
图11是作为本发明一实施例的稀疏连接的人工神经网络运算过程的流程图;
图12是作为本发明另一实施例的稀疏连接的人工神经网络运算装置的结构示意图;
图13是作为本发明另一实施例的映射单元的结构示意图;
图14是作为本发明再一实施例的稀疏连接的人工神经网络运算装置的结构示意图;
图15是作为本发明再一实施例的映射单元的结构示意图;
图16是作为本发明还一实施例的稀疏连接的人工神经网络运算装置的结构示意图;
图17是作为本发明还一实施例的映射单元的结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明作进一步的详细说明。
本发明公开了一种用于稀疏连接的人工神经网络计算装置,包括:
映射单元,用于将输入数据转换成输入神经元和权值一一对应的存储方式,并存储在存储装置或者缓存中;
存储装置,用于存储数据和指令;
运算单元,用于根据所述存储装置中存储的指令对所述数据执行相应的运算;所述运算单元主要执行三步运算,第一步是将输入的神经元和权值数据相乘;第二步执行加法树运算,用于将第一步处理后的加权输出神经元通过加法树逐级相加,或者将输出神经元通过和偏置相加得到加偏置输出神经元;第三步执行激活函数运算,得到最终输出神经元。
其中,所述映射单元中的一一对应关系表示如下:
第一种情形:
采用1表示有连接,0表示无连接,每个输出与所有输入的连接状态组成一个0和1的字符串来表示该输出的连接关系;或者
采用1表示有连接,0表示无连接,每个输入与所有输出的连接状态组成一个0和1的字符串来表示该输入的连接关系;
第二种情形:
将一输出第一个连接所在的位置距离第一个输入神经元的距离、所述输出第二个输入神经元距离上一个输入神经元的距离,所述输出第三个输入神经元距离上一个输入神经元的距离,……,依次类推,直到穷举所述输出的所有输入,来表示所述输出的连接关系。
作为优选,所述人工神经网络计算装置还包括DMA,用于在所述存储装置和缓存中进行数据或者指令读写。
作为优选,所述人工神经网络计算装置还包括:
指令缓存,用于存储专用指令;以及
控制单元,用于从所述指令缓存中读取专用指令,并将其译码成各运算单元指令。
作为优选,所述人工神经网络计算装置还包括:
输入神经元缓存,用于缓存输入到所述运算单元的输入神经元数据;以及
权值缓存,用于缓存权值数据。
作为优选,所述人工神经网络计算装置还包括:
输出神经元缓存,用于缓存所述运算单元输出的输出神经元。
作为优选,所述映射单元用于将输入数据转换成输入神经元和权值一一对应的存储方式,并输出到所述运算单元,而不是存储在存储装置中。
作为优选,所述人工神经网络计算装置还包括输入神经元缓存和/或权值缓存,所述输入神经元缓存用于缓存输入到所述运算单元的输入神经元数据,所述权值缓存用于缓存权值数据,所述映射单元用于将输 入数据转换成输入神经元和权值一一对应的存储方式,并输出到所述输入神经元缓存和/或权值缓存。
作为优选,所述运算单元在第三步执行的激活函数为sigmoid函数、tanh函数或ReLU函数。
本发明还公开了一种用于稀疏连接的人工神经网络的计算方法,包括以下步骤:
步骤1,将输入数据转换成输入神经元和权值一一对应的存储方式;其中,所述对应关系表示为:
第一种情形:
采用1表示有连接,0表示无连接,每个输出与所有输入的连接状态组成一个0和1的字符串来表示该输出的连接关系;或者
采用1表示有连接,0表示无连接,每个输入与所有输出的连接状态组成一个0和1的字符串来表示该输入的连接关系;
第二种情形:
将一输出第一个连接所在的位置距离第一个输入神经元的距离、所述输出第二个输入神经元距离上一个输入神经元的距离,所述输出第三个输入神经元距离上一个输入神经元的距离,……,依次类推,直到穷举所述输出的所有输入,来表示所述输出的连接关系
步骤2,将输入的神经元和权值数据相乘;
步骤3,执行加法树运算,将第一步处理后的加权输出神经元通过加法树逐级相加,或者将输出神经元通过和偏置相加得到加偏置输出神经元;
步骤4,执行激活函数运算,得到最终输出神经元;其中,所述激活函数为sigmoid函数、tanh函数或ReLU函数。
下面结合附图和具体实施例对本发明的技术方案进行进一步的阐释说明。
图3是根据本发明一个实施例的总体结构的示意性框图。
I/O接口1,用于I/O数据需要经过CPU3发给稀疏的多层人工神经网络运算装置,然后由稀疏的多层人工神经网络运算装置4写入存储装置,稀疏的多层人工神经网络运算装置4需要的专用程序也是由CPU3传输到稀疏的多层人工神经网络运算装置4。
存储装置2用于暂存稀疏的多层人工神经网络模型和神经元数据,特别是当全部模型无法在稀疏的多层人工神经网络运算装置4上的缓存中放下时。
中央处理器CPU3,用于进行数据搬运以及稀疏的多层人工神经网络运算装置4启动停止等基本控制,作为稀疏的多层人工神经网络运算装置4与外部控制的接口。
稀疏的人工神经网络运算装置4,用于执行稀疏的多层人工神经网络运算单元,接受来自CPU3的数据和程序,执行上述稀疏的多层人工神经网络运算算法,稀疏的人工神经网络运算装置4的执行结果将传输回CPU3。
通用***结构:将稀疏的人工神经网络运算装置4作为CPU 3或者GPU的协处理器来执行稀疏的多层人工神经网络运算算法。
多个稀疏的人工神经网络运算装置互联的***结构:多个稀疏的人工神经网络运算装置4可以通过PCIE总线互联,以支持更大规模的稀疏的多层人工神经网络运算,可以共用同一个宿主CPU或者分别有自己的宿主CPU,可以共享内存也可以每个加速器有各自的内存。此外其互联方式可以是任意互联拓扑。
对于一个稀疏连接的神经网络如图4所示,有4个输入神经元:i1,i2,i3,i4,有2个输出神经元:o1,o2。其中,o1和i1,i3,i4有连接,把连接的权值分别表示为w11,w31,w41,o2和i2,i3有连接,把连接的权值分别表示为w22,w32
有两种方法可以表示上面稀疏神经网络的连接关系,一种是每个输入与输出神经元之间都用一位表示是否有连接,另一种是用连接之间的距离来表示每个连接的位置。
第一种连接表示:
对于图4中的神经网络,如图5所示,输出神经元o1的连接关系为:1011,每一位表示是否与输入有连接,1表示有连接,0表示无连接,输出神经元o2的连接关系为0110。在运算时,连接关系为0所对应的输入神经元不会进行运算。
在存储连接关系时,可以按照优先输入或者输出神经元的顺序对连接关系进行存储。具体存储格式有以下几种:
格式一:将每个输出的所有输入依次摆放完,上面的例子摆放的顺序为10110110。
格式二:将每个输入的所有的输出依次摆放完,上面的例子摆放的顺序为10011110。
第二种连接表示:
比如对于图6中的神经网络,输出神经元o1与输入神经元i1,i3,i4相连接,那么连接关系为0,2,1。0表示第一个连接所在的位置距离第一个输入神经元的距离为0,即第一个输入神经元,2表示第二个输入神经元距离上一个输入神经元的距离为2,即表示第三个输入神经元,1表示第三个输入神经元距离上一个输入神经元的距离为1,即表示第四个输入神经元。同理,o2的连接关系为1,1。
本发明的映射单元包括但不限于以上的连接关系。
卷积神经网络是人工神经网络的一种,卷积层包含多个滤波器,也就是卷积核,这些卷积核重复的作用于所有输入图像上,提取局部特征。不同的卷积核能够提取出不同种类的局部特征,一副输入图像在经过卷积层之后就变成一些能够被更好理解的抽象特征。
自然图像有其固有特性,也就是说,图像的一部分的统计特性与其他部分是一样的。这也意味着在这一部分学习的特征也能用在另一部分上,所以对于这个图像上的所有位置,都能使用同样的学习特征。当从一个大尺寸图像中随机选取一小块,比如说8*8作为样本,并且从这个小块样本中学习到了一些特征,这时可以把从这个8*8样本中学习到的特征作为探测器,应用到这个图像的任意地方中去。特别是,可以用从8*8样本中学习到的特征跟原本的大尺寸图像做卷积,从而对这个大尺 寸图像上的任意位置获得一个不同特征的激活值。这个8*8的样本特征被称作卷积核。
如图7是一个卷积操作的例子。卷积核是一个2*2的矩阵,卷积核在输入图像上滑动。
假设每次滑动一个像素点,则总共会有四次卷积操作。对于每次卷积操作,卷积核矩阵与对应的输入图像数据做乘加操作。
假设卷积核的权值变得稀疏,由之前的2*2,变成只有两个参数,如图8所示。则对于输出o0来说,需要的输入神经元为i0,i1,i3,i4,输入权值为:w0,w3,连接关系为1001或者0,2;
对于输出o3来说,需要的输入神经元为i3,i5,i7,i8,输入权值为:w0,w3,连接关系为1001或者0,2。
由此可见,对于同个输出特征图上的不同的输出神经元,所需要的输入神经元不同,权值和连接关系是相同的。
可执行稀疏连接的人工神经网络运算装置可以处理各种稀疏连接表示的稀疏连接的人工神经网络,可执行稀疏连接的人工神经网络运算装置中有一个专门用于处理稀疏连接的单元,在这里称为映射单元,对于不同的稀疏连接关系和处理方法,稀疏连接的人工神经网络运算装置结构会略有不同,下面将分别描述不同的结构和方法。
结构和方法一
如图9所示,映射单元1,用来将输入数据转换成输入神经元和权值一一对应的存储方式。
存储装置2,用来存储数据和指令,尤其是神经网络规模很大的时候,指令缓存4、输入神经元缓存6、输出神经元缓存9、权值缓存8放不下这么多数据,只能将数据临时存放在存储装置2。
DMA3,用来将存储装置中的数据或者指令搬到各个缓存中。
指令缓存4,用来存储专用指令。
控制单元5,从指令缓存4中读取专用指令,并将其译码成各运算单元指令。
输入神经元缓存6,用来存储运算的输入神经元数据。
运算单元7,用于执行具体的运算。运算单元主要被分为三个阶段,第一阶段执行乘法运算,用于将输入的神经元和权值数据相乘。第二阶段执行加法树运算,第一、二两阶段合起来完成了向量内积运算。第三阶段执行激活函数运算,激活函数可以是sigmoid函数、tanh函数等。第三阶段得到输出神经元,写回到输出神经元缓存。
权值缓存8,用来存储权值数据。
输出神经元缓存9,用来存储运算的输出神经元。
映射单元的结构如图10所示。
以上面稀疏连接的神经网络为例,连接关系可以是上述的两种稀疏表示之一,映射单元会根据连接关系,将输入神经元和输入权值按照连接关系输出映射后的神经元和权值,映射后的神经元和权值可以在运算时被直接使用而不需要考虑连接关系,对于输出神经元o1映射的具体过程如下:
输入神经元为:i1,i2,i3,i4,输入权值为:w11,w31,w41,连接关系可以为:1011,或0,2,1。映射单元根据连接关系,将输入神经元和权值变成相对应的关系,输出有两种情况:一种是去除掉没有连接的输入神经元,则映射后的神经元为i1,i3,i4,映射后的权值为w11,w31,w41;另一种是权值在没有连接的地方补成0,则映射后的神经元为i1,i2,i3,i4,映射后的权值为w11,0,w31,w41
运算单元主要分为三个部分,第一部分乘法器,第二部分加法树,第三部分为线性函数单元。第一部分将输入神经元(in)通过和权值(w)相乘得到加权输出神经元(out),过程为:out=w*in;第二部分将加权输出神经元通过加法树逐级相加,另外还可以将输出神经元(in)通过和偏置(b)相加得到加偏置输出神经元(out),过程为:out=in+b;第三部分将输出神经元(in)通过激活函数(active)运算得到激活输出神经元(out),过程为:out=active(in),激活函数active可以是sigmoid、tanh、relu、softmax等,除了做激活操作,第三部分可以实现其他的非 线性函数,可将将输入神经元(in)通过运算(f)得到输出神经元(out),过程为:out=f(in)。
运算过程如图11所示。
结构和方法二
如图12所示,存储装置1,用来存储数据和指令,尤其是神经网络规模很大的时候,指令缓存3、输入神经元缓存6、输出神经元缓存9、权值缓存8放不下这么多数据,只能将数据临时存放在存储装置1。
DMA2,用来将存储装置中的数据或者指令搬到各个缓存中。
指令缓存3,用来存储专用指令。
控制单元4,从指令缓存3中读取专用指令,并将其译码成各运算单元指令。
映射单元5,用来将输入数据转换成输入神经元和权值一一对应的存储方式。
输入神经元缓存6,用来存储运算的输入神经元数据。
运算单元7,用于执行具体的运算。运算单元主要被分为三个阶段,第一阶段执行乘法运算,用于将输入的神经元和权值数据相乘。第二阶段执行加法树运算,第一、二两阶段合起来完成了向量内积运算。第三阶段执行激活函数运算,激活函数可以是sigmoid函数、tanh函数等。第三阶段得到输出神经元,写回到输出神经元缓存。
权值缓存8,用来存储权值数据。
输出神经元缓存9,用来存储运算的输出神经元。
映射单元的结构如图13所示。
以上述稀疏连接的神经网络为例,连接关系可以是上述的两种稀疏表示之一,映射单元会根据连接关系,将输入神经元和输入权值按照连接关系输出映射后的神经元和权值,映射后的神经元和权值可以在运算时被直接使用而不需要考虑连接关系,对于输出神经元o1映射的具体过程如下:
输入神经元为:i1,i2,i3,i4,输入权值为:w11,w31,w41,连接关系可以为:1011,或0,2,1。映射单元根据连接关系,将输入神经元和权值变成相对应的关系,输出有两种情况:一种是去除掉没有连接的输入神经元,则映射后的神经元为i1,i3,i4,映射后的权值为w11,w31,w41;另一种是权值在没有连接的地方补成0,则映射后的神经元为i1,i2,i3,i4,映射后的权值为w11,0,w31,w41
结构和方法一和结构方法二中的映射单元的主要区别是结构和方法一中的映射单元是在计算之前事先把输入神经元和权值映射好后存储在存储装置中,结构和方法二是在计算中进行映射,将映射好的数据直接给运算单元进行运算。
结构和方法三:
基于结构和方法二稍作修改可以改成如图14所示的结构,映射单元只对输入神经元进行映射。
此时,映射单元的结构图如图15所示。
对于输出神经元o1映射的具体过程如下:
输入神经元为:i1,i2,i3,i4,连接关系可以为:1011,或者:0,2,1。映射单元根据连接关系,将输入神经元和权值变成相对应的关系,去除掉没有连接的输入神经元,则映射后的神经元为i1,i3,i4
结构和方法四:
基于结构和方法二稍作修改可以改成如图16所示的结构,映射单元只对输入权值进行映射。
此时,映射单元的结构图如图17所示。
对于输出神经元o1映射的具体过程如下:
输入权值为:w11,w31,w41,连接关系可以为:1011,或者:0,2,1。映射单元根据连接关系,将输入神经元和权值变成相对应的关系,映射后的权值为w11,0,w31,w41
以上所述的具体实施例,对本发明的目的、技术方案和有益效果进行了进一步详细说明,应理解的是,以上所述仅为本发明的具体实施例而已,并不用于限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (10)

  1. 一种用于稀疏连接的人工神经网络计算装置,其特征在于,包括:
    映射单元,用于将输入数据转换成输入神经元和权值一一对应的存储方式,并存储在存储装置和/或缓存中;
    存储装置,用于存储数据和指令;
    运算单元,用于根据所述存储装置中存储的指令对所述数据执行相应的运算;所述运算单元主要执行三步运算,第一步是将所述输入神经元和权值数据相乘;第二步执行加法树运算,用于将第一步处理后的加权输出神经元通过加法树逐级相加,或者将输出神经元通过和偏置相加得到加偏置输出神经元;第三步执行激活函数运算,得到最终输出神经元。
  2. 如权利要求1所述的用于稀疏连接的人工神经网络计算装置,其特征在于,所述映射单元中的一一对应关系如下表示:
    第一种情形:
    采用1表示有连接,0表示无连接,每个输出与所有输入的连接状态组成一个0和1的字符串来表示该输出的连接关系;或者
    采用1表示有连接,0表示无连接,每个输入与所有输出的连接状态组成一个0和1的字符串来表示该输入的连接关系;
    第二种情形:
    将一输出第一个连接所在的位置距离第一个输入神经元的距离、所述输出第二个输入神经元距离上一个输入神经元的距离,所述输出第三个输入神经元距离上一个输入神经元的距离,……,依次类推,直到穷举所述输出的所有输入,来表示所述输出的连接关系。
  3. 如权利要求1所述的用于稀疏连接的人工神经网络计算装置,其特征在于,所述人工神经网络计算装置还包括DMA,用于在所述存储装置和缓存中进行数据或者指令读写。
  4. 如权利要求3所述的用于稀疏连接的人工神经网络计算装置, 其特征在于,所述人工神经网络计算装置还包括:
    指令缓存,用于存储专用指令;以及
    控制单元,用于从所述指令缓存中读取专用指令,并将其译码成各运算单元指令。
  5. 如权利要求3所述的用于稀疏连接的人工神经网络计算装置,其特征在于,所述人工神经网络计算装置还包括:
    输入神经元缓存,用于缓存输入到所述运算单元的输入神经元数据;以及
    权值缓存,用于缓存权值数据。
  6. 如权利要求3所述的用于稀疏连接的人工神经网络计算装置,其特征在于,所述人工神经网络计算装置还包括:
    输出神经元缓存,用于缓存所述运算单元输出的输出神经元。
  7. 如权利要求1所述的用于稀疏连接的人工神经网络计算装置,其特征在于,所述映射单元用于将输入数据转换成输入神经元和权值一一对应的存储方式,并输出到所述运算单元,而不是存储在存储装置中。
  8. 如权利要求7所述的用于稀疏连接的人工神经网络计算装置,其特征在于,所述人工神经网络计算装置还包括输入神经元缓存和/或权值缓存,所述输入神经元缓存用于缓存输入到所述运算单元的输入神经元数据,所述权值缓存用于缓存权值数据,所述映射单元用于将输入数据转换成输入神经元和权值一一对应的存储方式,并输出到所述输入神经元缓存和/或权值缓存。
  9. 如权利要求1所述的用于稀疏连接的人工神经网络计算装置,其特征在于,所述运算单元在第三步执行的激活函数为sigmoid函数、tanh函数或ReLU函数。
  10. 一种用于稀疏连接的人工神经网络的计算方法,其特征在于,包括以下步骤:
    步骤1,将输入数据转换成输入神经元和权值一一对应的存储方式;其中,所述对应关系表示为:
    第一种情形:
    采用1表示有连接,0表示无连接,每个输出与所有输入的连接状态组成一个0和1的字符串来表示该输出的连接关系;或者
    采用1表示有连接,0表示无连接,每个输入与所有输出的连接状态组成一个0和1的字符串来表示该输入的连接关系;
    第二种情形:
    将一输出第一个连接所在的位置距离第一个输入神经元的距离、所述输出第二个输入神经元距离上一个输入神经元的距离,所述输出第三个输入神经元距离上一个输入神经元的距离,……,依次类推,直到穷举所述输出的所有输入,来表示所述输出的连接关系
    步骤2,将输入的神经元和权值数据相乘;
    步骤3,执行加法树运算,将第一步处理后的加权输出神经元通过加法树逐级相加,或者将输出神经元通过和偏置相加得到加偏置输出神经元;
    步骤4,执行激活函数运算,得到最终输出神经元;其中,所述激活函数为sigmoid函数、tanh函数或ReLU函数。
PCT/CN2016/078545 2016-01-20 2016-04-06 一种用于稀疏连接的人工神经网络计算装置和方法 WO2017124646A1 (zh)

Priority Applications (7)

Application Number Priority Date Filing Date Title
KR1020187018866A KR102163561B1 (ko) 2016-01-20 2016-04-06 스파스 연결용 인공 신경망 계산 장치와 방법
EP16885910.6A EP3407266B1 (en) 2016-01-20 2016-04-06 Artificial neural network calculating device and method for sparse connection
KR1020187015437A KR102142889B1 (ko) 2016-01-20 2016-04-06 스파스 연결용 인공 신경망 계산 장치와 방법
KR1020187018864A KR102166775B1 (ko) 2016-01-20 2016-04-06 스파스 연결용 인공 신경망 계산 장치와 방법
US15/975,065 US20180260709A1 (en) 2016-01-20 2018-05-09 Calculating device and method for a sparsely connected artificial neural network
US15/975,083 US20180260711A1 (en) 2016-01-20 2018-05-09 Calculating device and method for a sparsely connected artificial neural network
US15/975,075 US20180260710A1 (en) 2016-01-20 2018-05-09 Calculating device and method for a sparsely connected artificial neural network

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610039162.5A CN105512723B (zh) 2016-01-20 2016-01-20 一种用于稀疏连接的人工神经网络计算装置和方法
CN201610039162.5 2016-01-20

Related Child Applications (3)

Application Number Title Priority Date Filing Date
US15/975,075 Division US20180260710A1 (en) 2016-01-20 2018-05-09 Calculating device and method for a sparsely connected artificial neural network
US15/975,083 Division US20180260711A1 (en) 2016-01-20 2018-05-09 Calculating device and method for a sparsely connected artificial neural network
US15/975,065 Division US20180260709A1 (en) 2016-01-20 2018-05-09 Calculating device and method for a sparsely connected artificial neural network

Publications (1)

Publication Number Publication Date
WO2017124646A1 true WO2017124646A1 (zh) 2017-07-27

Family

ID=55720686

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/078545 WO2017124646A1 (zh) 2016-01-20 2016-04-06 一种用于稀疏连接的人工神经网络计算装置和方法

Country Status (5)

Country Link
US (3) US20180260709A1 (zh)
EP (1) EP3407266B1 (zh)
KR (3) KR102163561B1 (zh)
CN (6) CN107545303B (zh)
WO (1) WO2017124646A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019069304A1 (en) * 2017-10-06 2019-04-11 DeepCube LTD. SYSTEM AND METHOD FOR COMPACT AND EFFICIENT PARCIMONIOUS NEURON NETWORKS
GB2560600B (en) * 2017-11-06 2020-03-04 Imagination Tech Ltd Nueral Network Hardware
US20200097824A1 (en) * 2017-12-11 2020-03-26 Cambricon Technologies Corporation Limited Neural network calculation apparatus and method
US11263292B2 (en) 2018-11-20 2022-03-01 Huawei Technologies Co., Ltd. Method, circuit, and SOC for performing matrix multiplication operation
US11551065B2 (en) 2017-11-06 2023-01-10 Imagination Technologies Limited Neural network architecture using control logic determining convolution operation sequence

Families Citing this family (126)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109358900B (zh) * 2016-04-15 2020-07-03 中科寒武纪科技股份有限公司 支持离散数据表示的人工神经网络正向运算装置和方法
CN105930902B (zh) * 2016-04-18 2018-08-10 中国科学院计算技术研究所 一种神经网络的处理方法、***
CN109375951B (zh) * 2016-04-27 2020-10-09 中科寒武纪科技股份有限公司 一种用于执行全连接层神经网络正向运算的装置和方法
WO2017185256A1 (zh) * 2016-04-27 2017-11-02 北京中科寒武纪科技有限公司 一种用于执行RMSprop梯度下降算法的装置及方法
CN107704267B (zh) * 2016-04-29 2020-05-08 中科寒武纪科技股份有限公司 一种卷积神经网络运算指令及其方法
CN109376861B (zh) * 2016-04-29 2020-04-24 中科寒武纪科技股份有限公司 一种用于执行全连接层神经网络训练的装置和方法
CN109284825B (zh) * 2016-04-29 2020-04-14 中科寒武纪科技股份有限公司 用于执行lstm运算的装置和方法
CN111310904B (zh) * 2016-04-29 2024-03-08 中科寒武纪科技股份有限公司 一种用于执行卷积神经网络训练的装置和方法
WO2017185347A1 (zh) * 2016-04-29 2017-11-02 北京中科寒武纪科技有限公司 用于执行循环神经网络和lstm运算的装置和方法
CN107341546B (zh) * 2016-04-29 2021-06-08 中科寒武纪科技股份有限公司 一种用于执行batch normalization运算的装置和方法
US20170330069A1 (en) * 2016-05-11 2017-11-16 Kneron Inc. Multi-layer artificial neural network and controlling method thereof
CN109478253B (zh) * 2016-05-19 2022-11-01 国立大学法人东京工业大学 神经网络电路以及神经网络集成电路
CN105893159B (zh) * 2016-06-21 2018-06-19 北京百度网讯科技有限公司 数据处理方法和装置
CN107678781B (zh) * 2016-08-01 2021-02-26 北京百度网讯科技有限公司 处理器以及用于在处理器上执行指令的方法
CN111310893B (zh) 2016-08-05 2023-11-21 中科寒武纪科技股份有限公司 一种用于执行神经网络运算的装置及方法
US11238337B2 (en) * 2016-08-22 2022-02-01 Applied Brain Research Inc. Methods and systems for implementing dynamic neural networks
CN107808664B (zh) * 2016-08-30 2021-07-30 富士通株式会社 基于稀疏神经网络的语音识别方法、语音识别装置和电子设备
CN106485317A (zh) * 2016-09-26 2017-03-08 上海新储集成电路有限公司 一种神经网络加速器以及神经网络模型的实现方法
CN110298443B (zh) * 2016-09-29 2021-09-17 中科寒武纪科技股份有限公司 神经网络运算装置及方法
WO2018058427A1 (zh) * 2016-09-29 2018-04-05 北京中科寒武纪科技有限公司 神经网络运算装置及方法
CN106529670B (zh) * 2016-10-27 2019-01-25 中国科学院计算技术研究所 一种基于权重压缩的神经网络处理器、设计方法、芯片
CN108022281B (zh) * 2016-10-31 2021-02-23 龙芯中科技术股份有限公司 渲染三维图形的方法及装置
CN108073550A (zh) * 2016-11-14 2018-05-25 耐能股份有限公司 缓冲装置及卷积运算装置与方法
CN106548234A (zh) * 2016-11-17 2017-03-29 北京图森互联科技有限责任公司 一种神经网络剪枝方法及装置
JP6961011B2 (ja) 2016-12-09 2021-11-05 ベイジン ホライズン インフォメーション テクノロジー カンパニー リミテッド データ管理のためのシステム及び方法
CN108229654B (zh) * 2016-12-14 2020-08-14 上海寒武纪信息科技有限公司 神经网络卷积运算装置及方法
CN108205706B (zh) * 2016-12-19 2021-04-23 上海寒武纪信息科技有限公司 人工神经网络反向训练装置和方法
WO2018112699A1 (zh) * 2016-12-19 2018-06-28 上海寒武纪信息科技有限公司 人工神经网络反向训练装置和方法
CN108205519B (zh) * 2016-12-20 2022-01-25 上海寒武纪信息科技有限公司 矩阵乘加运算装置和方法、处理装置、芯片、电子装置
EP3340129B1 (en) * 2016-12-21 2019-01-30 Axis AB Artificial neural network class-based pruning
CN111126590B (zh) * 2016-12-23 2023-09-29 中科寒武纪科技股份有限公司 一种人工神经网络运算的装置及方法
EP3564866A4 (en) * 2016-12-28 2020-03-25 Shanghai Cambricon Information Technology Co., Ltd CALCULATION PROCEDURE
CN108268939B (zh) * 2016-12-30 2021-09-07 上海寒武纪信息科技有限公司 用于执行lstm神经网络运算的装置和运算方法
WO2018120016A1 (zh) * 2016-12-30 2018-07-05 上海寒武纪信息科技有限公司 用于执行lstm神经网络运算的装置和运算方法
TWI630544B (zh) * 2017-02-10 2018-07-21 耐能股份有限公司 卷積神經網路的運算裝置及方法
CN107633297B (zh) * 2017-03-10 2021-04-06 南京风兴科技有限公司 一种基于并行快速fir滤波器算法的卷积神经网络硬件加速器
CN106951962B (zh) * 2017-03-22 2020-09-01 南京地平线机器人技术有限公司 用于神经网络的复合运算单元、方法和电子设备
EP3590076A1 (en) * 2017-03-24 2020-01-08 Huawei Technologies Co., Ltd. Neural network data processing apparatus and method
EP3620992B1 (en) * 2017-04-06 2024-05-29 Shanghai Cambricon Information Technology Co., Ltd Neural network processor and neural network computation method
US11551067B2 (en) 2017-04-06 2023-01-10 Shanghai Cambricon Information Technology Co., Ltd Neural network processor and neural network computation method
US10795836B2 (en) * 2017-04-17 2020-10-06 Microsoft Technology Licensing, Llc Data processing performance enhancement for neural networks using a virtualized data iterator
EP3614259A4 (en) 2017-04-19 2021-02-24 Shanghai Cambricon Information Technology Co., Ltd TREATMENT APPARATUS AND TREATMENT METHOD
CN108734281A (zh) * 2017-04-21 2018-11-02 上海寒武纪信息科技有限公司 处理装置、处理方法、芯片及电子装置
CN108734288B (zh) * 2017-04-21 2021-01-29 上海寒武纪信息科技有限公司 一种运算方法及装置
CN108734279B (zh) * 2017-04-20 2021-04-23 上海寒武纪信息科技有限公司 一种运算装置和方法
WO2018192492A1 (zh) * 2017-04-20 2018-10-25 上海寒武纪信息科技有限公司 一种运算装置及相关产品
CN114970827A (zh) * 2017-04-21 2022-08-30 上海寒武纪信息科技有限公司 一种运算装置和方法
WO2018214913A1 (zh) * 2017-05-23 2018-11-29 上海寒武纪信息科技有限公司 处理方法及加速装置
CN109478251B (zh) * 2017-05-23 2021-01-05 安徽寒武纪信息科技有限公司 处理方法及加速装置
CN109389218B (zh) * 2017-08-09 2021-09-03 上海寒武纪信息科技有限公司 数据压缩方法及压缩装置
CN108960420B (zh) * 2017-05-23 2021-06-08 上海寒武纪信息科技有限公司 处理方法及加速装置
CN110175673B (zh) * 2017-05-23 2021-02-09 上海寒武纪信息科技有限公司 处理方法及加速装置
CN109146069B (zh) * 2017-06-16 2020-10-13 上海寒武纪信息科技有限公司 运算装置、运算方法和芯片
CN109102074B (zh) * 2017-06-21 2021-06-01 上海寒武纪信息科技有限公司 一种训练装置
CN109102073A (zh) 2017-06-21 2018-12-28 上海寒武纪信息科技有限公司 一种稀疏训练方法
CN109117455A (zh) 2017-06-26 2019-01-01 上海寒武纪信息科技有限公司 计算装置及方法
EP3637327B1 (en) 2017-06-13 2023-09-13 Shanghai Cambricon Information Technology Co., Ltd Computing device and method
CN109426553A (zh) 2017-08-21 2019-03-05 上海寒武纪信息科技有限公司 任务切分装置及方法、任务处理装置及方法、多核处理器
CN109214616B (zh) * 2017-06-29 2023-04-07 上海寒武纪信息科技有限公司 一种信息处理装置、***和方法
CN110413551B (zh) 2018-04-28 2021-12-10 上海寒武纪信息科技有限公司 信息处理装置、方法及设备
WO2019001418A1 (zh) * 2017-06-26 2019-01-03 上海寒武纪信息科技有限公司 数据共享***及其数据共享方法
CN109583577B (zh) * 2017-09-29 2021-04-23 上海寒武纪信息科技有限公司 运算装置及方法
CN107729989B (zh) * 2017-07-20 2020-12-29 安徽寒武纪信息科技有限公司 一种用于执行人工神经网络正向运算的装置及方法
CN110245751B (zh) * 2017-08-31 2020-10-09 中科寒武纪科技股份有限公司 一种gemm运算方法及装置
CN109615061B (zh) * 2017-08-31 2022-08-26 中科寒武纪科技股份有限公司 一种卷积运算方法及装置
CN107590535A (zh) * 2017-09-08 2018-01-16 西安电子科技大学 可编程神经网络处理器
CN107766643B (zh) * 2017-10-16 2021-08-03 华为技术有限公司 数据处理方法及相关装置
CN109697509B (zh) * 2017-10-24 2020-10-20 上海寒武纪信息科技有限公司 处理方法及装置、运算方法及装置
KR102434726B1 (ko) * 2017-10-20 2022-08-19 상하이 캠브리콘 인포메이션 테크놀로지 컴퍼니 리미티드 처리방법 및 장치
CN109697135B (zh) * 2017-10-20 2021-03-26 上海寒武纪信息科技有限公司 存储装置及方法、数据处理装置及方法、电子装置
CN107832844A (zh) * 2017-10-30 2018-03-23 上海寒武纪信息科技有限公司 一种信息处理方法及相关产品
CN110097180B (zh) * 2018-01-29 2020-02-21 上海寒武纪信息科技有限公司 计算机设备、数据处理方法及存储介质
CN109993289B (zh) * 2017-12-30 2021-09-21 中科寒武纪科技股份有限公司 集成电路芯片装置及相关产品
CN109993291B (zh) * 2017-12-30 2020-07-07 中科寒武纪科技股份有限公司 集成电路芯片装置及相关产品
CN109993292B (zh) * 2017-12-30 2020-08-04 中科寒武纪科技股份有限公司 集成电路芯片装置及相关产品
WO2019129302A1 (zh) * 2017-12-30 2019-07-04 北京中科寒武纪科技有限公司 集成电路芯片装置及相关产品
CN109993290B (zh) 2017-12-30 2021-08-06 中科寒武纪科技股份有限公司 集成电路芯片装置及相关产品
CN108021537B (zh) * 2018-01-05 2022-09-16 南京大学 一种基于硬件平台的softmax函数计算方法
WO2019147751A2 (en) * 2018-01-24 2019-08-01 Fractal Industries, Inc. Platform for hierarchy cooperative computing
CN110163359B (zh) * 2018-02-13 2020-12-11 上海寒武纪信息科技有限公司 一种计算装置及方法
CN111767996B (zh) * 2018-02-27 2024-03-05 上海寒武纪信息科技有限公司 集成电路芯片装置及相关产品
CN110197263B (zh) * 2018-02-27 2020-10-09 上海寒武纪信息科技有限公司 集成电路芯片装置及相关产品
CN108171328B (zh) * 2018-03-02 2020-12-29 中国科学院计算技术研究所 一种神经网络处理器和采用其执行的卷积运算方法
CN110414663B (zh) * 2018-04-28 2022-03-25 深圳云天励飞技术有限公司 神经网络的卷积实现方法及相关产品
US11645529B2 (en) * 2018-05-01 2023-05-09 Hewlett Packard Enterprise Development Lp Sparsifying neural network models
CN108764468A (zh) * 2018-05-03 2018-11-06 中国科学院计算技术研究所 用于智能识别的人工神经网络处理器
CN108647777A (zh) * 2018-05-08 2018-10-12 济南浪潮高新科技投资发展有限公司 一种实现并行卷积计算的数据映射***及方法
CN108647155B (zh) * 2018-05-14 2020-08-21 瑞芯微电子股份有限公司 一种基于深度学习的多级cache共享的方法和装置
CN108647660A (zh) * 2018-05-16 2018-10-12 中国科学院计算技术研究所 一种使用神经网络芯片处理图像的方法
CN108921012B (zh) * 2018-05-16 2022-05-03 中国科学院计算技术研究所 一种利用人工智能芯片处理图像视频帧的方法
CN108566537A (zh) * 2018-05-16 2018-09-21 中国科学院计算技术研究所 用于对视频帧进行神经网络运算的图像处理装置
CN108764465B (zh) * 2018-05-18 2021-09-24 中国科学院计算技术研究所 一种进行神经网络运算的处理装置
CN108764470B (zh) * 2018-05-18 2021-08-31 中国科学院计算技术研究所 一种人工神经网络运算的处理方法
CN108647781B (zh) * 2018-05-18 2021-08-27 中国科学院计算技术研究所 一种人工智能芯片处理装置
CN108846142A (zh) * 2018-07-12 2018-11-20 南方电网调峰调频发电有限公司 一种文本聚类方法、装置、设备及可读存储介质
CN110738316B (zh) * 2018-07-20 2024-05-14 北京三星通信技术研究有限公司 基于神经网络的操作方法、装置及电子设备
CN112732601B (zh) * 2018-08-28 2024-06-18 中科寒武纪科技股份有限公司 数据预处理方法、装置、计算机设备和存储介质
WO2020042739A1 (zh) * 2018-08-28 2020-03-05 中科寒武纪科技股份有限公司 数据预处理方法、装置、计算机设备和存储介质
CN110874550A (zh) * 2018-08-31 2020-03-10 华为技术有限公司 数据处理方法、装置、设备和***
US11996105B2 (en) 2018-09-13 2024-05-28 Shanghai Cambricon Information Technology Co., Ltd. Information processing method and terminal device
US10817042B2 (en) * 2018-09-27 2020-10-27 Intel Corporation Power savings for neural network architecture with zero activations during inference
CN111078623B (zh) * 2018-10-18 2022-03-29 上海寒武纪信息科技有限公司 片上网络处理***和片上网络数据处理方法
CN111078625B (zh) * 2018-10-18 2022-03-29 上海寒武纪信息科技有限公司 片上网络处理***和片上网络数据处理方法
CN111078624B (zh) * 2018-10-18 2022-03-25 上海寒武纪信息科技有限公司 片上网络处理***和片上网络数据处理方法
KR102637733B1 (ko) * 2018-10-31 2024-02-19 삼성전자주식회사 뉴럴 네트워크 프로세서 및 그것의 컨볼루션 연산 방법
JP6852141B2 (ja) * 2018-11-29 2021-03-31 キヤノン株式会社 情報処理装置、撮像装置、情報処理装置の制御方法、および、プログラム
CN111290698B (zh) * 2018-12-07 2022-05-03 上海寒武纪信息科技有限公司 数据存取方法、数据处理方法、数据存取电路和运算装置
CN109657788A (zh) * 2018-12-18 2019-04-19 北京中科寒武纪科技有限公司 数据处理方法、装置及相关产品
KR102663561B1 (ko) * 2018-12-28 2024-05-08 엘지전자 주식회사 냉장고
KR102579883B1 (ko) 2018-12-28 2023-09-18 엘지전자 주식회사 냉장고
CN109740739B (zh) * 2018-12-29 2020-04-24 中科寒武纪科技股份有限公司 神经网络计算装置、神经网络计算方法及相关产品
KR102360452B1 (ko) * 2019-06-18 2022-02-11 주식회사 퓨리오사에이아이 뉴럴 네트워크 프로세서의 컨벌루션 연산 처리 방법 및 장치
US11630992B2 (en) 2019-07-05 2023-04-18 Electronics And Telecommunications Research Institute Neural network generation method for neuromorphic computing and apparatus for the same
CN110929627B (zh) * 2019-11-18 2021-12-28 北京大学 基于宽模型稀疏数据集的高效gpu训练模型的图像识别方法
US11537323B2 (en) 2020-01-07 2022-12-27 SK Hynix Inc. Processing-in-memory (PIM) device
US11422803B2 (en) * 2020-01-07 2022-08-23 SK Hynix Inc. Processing-in-memory (PIM) device
CN113222103A (zh) * 2020-02-05 2021-08-06 北京三星通信技术研究有限公司 神经网络的更新方法、分类方法和电子设备
CN111312270B (zh) * 2020-02-10 2022-11-22 腾讯科技(深圳)有限公司 语音增强方法及装置、电子设备和计算机可读存储介质
KR20210106131A (ko) 2020-02-20 2021-08-30 삼성전자주식회사 전자 장치 및 그의 제어 방법
US11556384B2 (en) 2020-03-13 2023-01-17 Cisco Technology, Inc. Dynamic allocation and re-allocation of learning model computing resources
CN111292322B (zh) * 2020-03-19 2024-03-01 中国科学院深圳先进技术研究院 医学图像处理方法、装置、设备及存储介质
CN111966405B (zh) * 2020-07-03 2022-07-26 北京航空航天大学杭州创新研究院 一种基于GPU的Polar码高速并行译码方法
CN112288085B (zh) * 2020-10-23 2024-04-09 中国科学院计算技术研究所 一种基于卷积神经网络的图像检测方法及***
CN112994840B (zh) * 2021-02-03 2021-11-02 白盒子(上海)微电子科技有限公司 一种基于神经网络的译码器
CN116863490B (zh) * 2023-09-04 2023-12-12 之江实验室 面向FeFET存储阵列的数字识别方法及硬件加速器
CN117689025B (zh) * 2023-12-07 2024-06-14 上海交通大学 适用于消费级显卡的快速大模型推理服务方法和***

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6148104A (en) * 1996-11-15 2000-11-14 Synaptics, Inc. Incremental ideographic character input method
CN102201188A (zh) * 2011-05-25 2011-09-28 华侨大学 一种面向楼宇电视广告***的智能控制装置和方法
CN104077595A (zh) * 2014-06-15 2014-10-01 北京工业大学 基于贝叶斯正则化的深度学习网络图像识别方法
CN104200224A (zh) * 2014-08-28 2014-12-10 西北工业大学 基于深度卷积神经网络的无价值图像去除方法

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR930009066B1 (ko) * 1990-08-18 1993-09-22 정호선 다층신경회로망 및 그 회로설계방법
US5517596A (en) * 1991-05-17 1996-05-14 International Business Machines Corporation Learning machine synapse processor system apparatus
US5293456A (en) * 1991-06-28 1994-03-08 E. I. Du Pont De Nemours And Company Object recognition system employing a sparse comparison neural network
US7080053B2 (en) * 2000-08-16 2006-07-18 Research Foundation Of State University Of New York Neural network device for evolving appropriate connections
US20020143720A1 (en) * 2001-04-03 2002-10-03 Anderson Robert Lee Data structure for improved software implementation of a neural network
JP4513865B2 (ja) * 2008-01-25 2010-07-28 セイコーエプソン株式会社 並列演算装置および並列演算方法
CN101527010B (zh) * 2008-03-06 2011-12-07 上海理工大学 人工神经网络算法的硬件实现方法及其***
US9015093B1 (en) * 2010-10-26 2015-04-21 Michael Lamport Commons Intelligent control with hierarchical stacked neural networks
CN103460220A (zh) * 2012-01-23 2013-12-18 松下电器产业株式会社 神经网络电路的学习方法
US8903746B2 (en) * 2012-03-22 2014-12-02 Audrey Kudritskiy System and method for viewing, modifying, storing, and running artificial neural network components
KR20150016089A (ko) * 2013-08-02 2015-02-11 안병익 신경망 컴퓨팅 장치 및 시스템과 그 방법
US9679258B2 (en) * 2013-10-08 2017-06-13 Google Inc. Methods and apparatus for reinforcement learning
JP6236296B2 (ja) * 2013-11-14 2017-11-22 株式会社デンソーアイティーラボラトリ 学習装置、学習プログラム、及び学習方法
US10339447B2 (en) * 2014-01-23 2019-07-02 Qualcomm Incorporated Configuring sparse neuronal networks
US20150269479A1 (en) * 2014-03-24 2015-09-24 Qualcomm Incorporated Conversion of neuron types to hardware
US10169073B2 (en) * 2015-12-20 2019-01-01 Intel Corporation Hardware accelerators and methods for stateful compression and decompression operations
EP3444757B1 (en) * 2016-04-15 2021-07-07 Cambricon Technologies Corporation Limited Discrete data representation supported device and method for forward operation of artificial neural network
US10949736B2 (en) * 2016-11-03 2021-03-16 Intel Corporation Flexible neural network accelerator and methods therefor
CN107688850B (zh) * 2017-08-08 2021-04-13 赛灵思公司 一种深度神经网络压缩方法
US10719932B2 (en) * 2018-03-01 2020-07-21 Carl Zeiss Meditec, Inc. Identifying suspicious areas in ophthalmic data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6148104A (en) * 1996-11-15 2000-11-14 Synaptics, Inc. Incremental ideographic character input method
CN102201188A (zh) * 2011-05-25 2011-09-28 华侨大学 一种面向楼宇电视广告***的智能控制装置和方法
CN104077595A (zh) * 2014-06-15 2014-10-01 北京工业大学 基于贝叶斯正则化的深度学习网络图像识别方法
CN104200224A (zh) * 2014-08-28 2014-12-10 西北工业大学 基于深度卷积神经网络的无价值图像去除方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3407266A4 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10366322B2 (en) 2017-10-06 2019-07-30 DeepCube LTD. System and method for compact and efficient sparse neural networks
WO2019069304A1 (en) * 2017-10-06 2019-04-11 DeepCube LTD. SYSTEM AND METHOD FOR COMPACT AND EFFICIENT PARCIMONIOUS NEURON NETWORKS
US11580352B2 (en) 2017-10-06 2023-02-14 Nano Dimension Technologies, Ltd. System and method for compact and efficient sparse neural networks
US11551065B2 (en) 2017-11-06 2023-01-10 Imagination Technologies Limited Neural network architecture using control logic determining convolution operation sequence
GB2560600B (en) * 2017-11-06 2020-03-04 Imagination Tech Ltd Nueral Network Hardware
US11907830B2 (en) 2017-11-06 2024-02-20 Imagination Technologies Limited Neural network architecture using control logic determining convolution operation sequence
US11803738B2 (en) 2017-11-06 2023-10-31 Imagination Technologies Limited Neural network architecture using convolution engine filter weight buffers
US20200097824A1 (en) * 2017-12-11 2020-03-26 Cambricon Technologies Corporation Limited Neural network calculation apparatus and method
US11803735B2 (en) 2017-12-11 2023-10-31 Cambricon Technologies Corporation Limited Neural network calculation apparatus and method
CN111738431A (zh) * 2017-12-11 2020-10-02 中科寒武纪科技股份有限公司 神经网络运算设备和方法
CN111738431B (zh) * 2017-12-11 2024-03-05 中科寒武纪科技股份有限公司 神经网络运算设备和方法
US11397791B2 (en) 2018-11-20 2022-07-26 Huawei Technologies Co., Ltd. Method, circuit, and SOC for performing matrix multiplication operation
US11263292B2 (en) 2018-11-20 2022-03-01 Huawei Technologies Co., Ltd. Method, circuit, and SOC for performing matrix multiplication operation
US11860970B2 (en) 2018-11-20 2024-01-02 Huawei Technologies Co., Ltd. Method, circuit, and SOC for performing matrix multiplication operation

Also Published As

Publication number Publication date
KR102163561B1 (ko) 2020-10-08
CN107578099A (zh) 2018-01-12
US20180260709A1 (en) 2018-09-13
CN105512723B (zh) 2018-02-16
KR20180093969A (ko) 2018-08-22
US20180260710A1 (en) 2018-09-13
US20180260711A1 (en) 2018-09-13
CN107545303A (zh) 2018-01-05
CN107609642A (zh) 2018-01-19
CN107578099B (zh) 2021-06-11
CN107563497A (zh) 2018-01-09
EP3407266A1 (en) 2018-11-28
EP3407266A4 (en) 2019-09-18
KR20180093970A (ko) 2018-08-22
CN107609642B (zh) 2021-08-31
KR102142889B1 (ko) 2020-08-10
CN107506828B (zh) 2020-11-03
KR102166775B1 (ko) 2020-10-16
KR20180101334A (ko) 2018-09-12
CN105512723A (zh) 2016-04-20
CN107545303B (zh) 2021-09-07
CN107506828A (zh) 2017-12-22
CN107563497B (zh) 2021-03-19
EP3407266B1 (en) 2023-08-09

Similar Documents

Publication Publication Date Title
WO2017124646A1 (zh) 一种用于稀疏连接的人工神经网络计算装置和方法
US11574195B2 (en) Operation method
CN108427990B (zh) 神经网络计算***和方法
WO2021208612A1 (zh) 数据处理的方法与装置
WO2020073211A1 (zh) 运算加速器、处理方法及相关设备
CN109726806A (zh) 信息处理方法及终端设备
CN108171328B (zh) 一种神经网络处理器和采用其执行的卷积运算方法
WO2018120016A1 (zh) 用于执行lstm神经网络运算的装置和运算方法
EP3561732A1 (en) Operation apparatus and method for artificial neural network
CN112789627B (zh) 一种神经网络处理器、数据处理方法及相关设备
CN112348182B (zh) 一种神经网络maxout层计算装置
CN114925320B (zh) 一种数据处理方法及相关装置
WO2018112892A1 (zh) 一种支持快速人工神经网络运算的装置及方法
WO2020042770A1 (zh) 图像识别处理方法和装置
US20230229916A1 (en) Scalable tensor network contraction using reinforcement learning

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: 16885910

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20187015437

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE