JP3292073B2 - Neural unit operation method and device - Google Patents

Neural unit operation method and device

Info

Publication number
JP3292073B2
JP3292073B2 JP35436996A JP35436996A JP3292073B2 JP 3292073 B2 JP3292073 B2 JP 3292073B2 JP 35436996 A JP35436996 A JP 35436996A JP 35436996 A JP35436996 A JP 35436996A JP 3292073 B2 JP3292073 B2 JP 3292073B2
Authority
JP
Japan
Prior art keywords
value
sum
neural
output
sigmoid function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP35436996A
Other languages
Japanese (ja)
Other versions
JPH10187648A (en
Inventor
冬樹 岡本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP35436996A priority Critical patent/JP3292073B2/en
Publication of JPH10187648A publication Critical patent/JPH10187648A/en
Application granted granted Critical
Publication of JP3292073B2 publication Critical patent/JP3292073B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ニューラルネット
ワークの基本演算である積和演算およびシグモイド関数
変換を行うニューラルユニット演算方式とその装置に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a neural unit operation method for performing a product-sum operation and a sigmoid function conversion, which are basic operations of a neural network, and an apparatus therefor.

【0002】[0002]

【従来の技術】近時、半導体技術の発展に伴い、ニュー
ラルネットワークをデジタルLSIによって実現しよう
という試みが盛んになってきている。ニューラルネット
ワークの基本構成を図3に示す。図3を参照すると、複
数のニューラルユニットがネットワーク状に結合されて
おり、各ニューラルユニットは、複数の別のニューラル
ユニットからの信号を入力し、別のニューラルユニット
へと出力を供給している。そして各ニューラルユニット
は、そのニューラルユニットへ信号を供給しているニュ
ーラルユニットとの間の結合の度合いを表す「シナプス
荷重値」を備えている。
2. Description of the Related Art Recently, with the development of semiconductor technology, attempts to realize a neural network by a digital LSI have become active. FIG. 3 shows the basic configuration of the neural network. Referring to FIG. 3, a plurality of neural units are connected in a network, and each neural unit receives a signal from a plurality of other neural units and supplies an output to another neural unit. Each neural unit has a “synaptic weight value” that indicates the degree of coupling with the neural unit that supplies a signal to the neural unit.

【0003】例えば、図3において、第jニューラルユ
ニット301は、第A、第B、第Cニューラルユニット
302、303、304からの出力を受けている。第j
ニューラルユニット301は、これらの3つのニューラ
ルユニット302、303、304との間の結合強度を
表すシナプス荷重値WjA、WjB、WjCを備えている。
For example, in FIG. 3, a j-th neural unit 301 receives outputs from A-th, B-th, and C-th neural units 302, 303, and 304. Jth
The neural unit 301 includes synapse load values W jA , W jB , and W jC indicating the strength of connection between these three neural units 302 , 303 , 304 .

【0004】さて、第A、第B、第Cニューラルユニッ
ト302、303、304の出力信号をそれぞれ、
A、XB、XCとしよう。すると、第jニューラルユニ
ットからの信号Xjは、次のようにして計算され出力さ
れる。
The output signals of the A-th, B-th, and C-th neural units 302, 303, and 304 are respectively
Let X A , X B , X C. Then, the signal X j from the j-th neural unit is calculated and output as follows.

【0005】まず、信号XA、XB、XCと、シナプス荷
重値WjA、WjB、WjCとを用いて、次式(1)の積和m
を計算する。
First, using the signals X A , X B , X C and the synapse load values W jA , W jB , W jC , the product sum m of the following equation (1) is obtained.
Is calculated.

【0006】m=WjAA+WjBB+WjCC …(1) M = W jA X A + W jB X B + W jC X C (1)

【0007】このmの値に対して、次のようなシグモイ
ド関数による非線形変換処理を行い、Xjが出力され
る。すなわち、mと出力Xjとは、シグモイド関数fに
よって、次式(2)のように関係付けられる。
The value of m is subjected to a non-linear conversion process using the following sigmoid function, and Xj is output. That is, m and the output Xj are related by the sigmoid function f as in the following equation (2).

【0008】Xj=f(m) …(2)X j = f (m) (2)

【0009】なお、シグモイド関数fとは、図2に示す
ような形状を持つ非線形関数であり、入力mが零近辺で
はmとともに急峻にその値が増加するが、入力mがある
程度大きい値になるとその値は飽和する、という特徴を
もっている。
The sigmoid function f is a non-linear function having a shape as shown in FIG. 2. When the input m is near zero, its value increases sharply with m. The value is saturated.

【0010】ニューラルネットワークにおいては、その
構成要素であるニューラルユニットが、以上のような積
和演算とシグモイド関数変換処理とを行って、その結果
を次段のニューラルユニットへ出力していき、所定の段
数だけ信号伝達が行われた後に、外部へ信号が出力され
る。
In the neural network, the neural unit, which is a component of the neural network, performs the above-described product-sum operation and sigmoid function conversion process, and outputs the result to the next-stage neural unit. After signal transmission is performed by the number of stages, a signal is output to the outside.

【0011】さて、このようなニューラルネットワーク
においては、各ニューラルユニットの処理すべき基本演
算は、上式(1)、(2)のような積和演算とシグモイ
ド関数変換である。よって、ニューラルユニットをデジ
タル回路によって、図4に示すような回路構成によって
実現することができる。
In such a neural network, basic operations to be processed by each neural unit are a product-sum operation and a sigmoid function conversion as in the above equations (1) and (2). Therefore, the neural unit can be realized by a digital circuit and a circuit configuration as shown in FIG.

【0012】図4は、デジタル回路による、従来のニュ
ーラルユニットの基本構成を示す図である。図4を参照
して、従来のデジタル型のニューラルユニットの動作を
以下に説明する。
FIG. 4 is a diagram showing a basic configuration of a conventional neural unit using a digital circuit. The operation of the conventional digital neural unit will be described below with reference to FIG.

【0013】図4において、ニューラルユニットを第j
ニューラルユニットとする(図3の301参照)。そし
て、このニューラルユニットには、N個のニューラルユ
ニット(第1〜第Nニューラルユニット)が、それぞれ
信号X1〜XNを供給しているものとする。また第1〜第
Nニューラルユニットと、この第jニューラルユニット
と、の間のシナプス荷重値をそれぞれWj1、Wj2
j3、…、WjNとする。なお、信号X1〜XN、及びシナ
プス荷重値Wj1〜WjNは、それぞれ、適当なビット長の
2進数によって表現されているものとする。
In FIG. 4, the neural unit is a j-th unit.
Let it be a neural unit (see 301 in FIG. 3). It is assumed that N neural units (first to N-th neural units) supply signals X 1 to X N to this neural unit, respectively. Further, the synapse load values between the first to Nth neural units and the jth neural unit are W j1 , W j2 ,
W j3 ,..., W jN . Note that the signals X 1 to X N and the synapse load values W j1 to W jN are each represented by a binary number having an appropriate bit length.

【0014】さて、この第jニューラルユニットは、図
4に示すように、乗算器402、加算器403、及び、
シナプス荷重値(Wj1、Wj2、Wj3、…、WjN)を格納
するシナプス荷重値メモリ401から構成されている。
As shown in FIG. 4, the j-th neural unit includes a multiplier 402, an adder 403, and
It comprises a synapse load value memory 401 for storing synapse load values (W j1 , W j2 , W j3 ,..., W jN ).

【0015】N個のニューラルユニットからの出力信号
1〜XNは、順番に入力信号線400に供給され、ま
た、これに同期して、シナプス荷重値メモリ401か
ら、Wj1、Wj2、…、WjNが順番に読み出される。
Output signals X 1 to X N from the N neural units are sequentially supplied to an input signal line 400, and in synchronism therewith , W j1 , W j2 , .., W jN are sequentially read.

【0016】こうして第1サイクルでは、入力信号線4
00にX1が供給され、シナプス荷重値メモリ401か
らは、シナプス荷重値Wj1が読み出され、この両者の積
が乗算器402によって計算される。
Thus, in the first cycle, the input signal line 4
X 1 is supplied to 00, the synapse load value W j1 is read from the synapse load value memory 401, and the product of the two is calculated by the multiplier 402.

【0017】つづいて第2サイクルでは、同様に、X2
とWj2との積が計算される。各サイクル毎に求められた
積Wjiiは、加算器403によって累和されていく。
Subsequently, in the second cycle, similarly, X 2
And W j2 are calculated. The products W ji X i obtained for each cycle are accumulated by the adder 403.

【0018】このようにして、次式(3)に示すよう
に、Nサイクルかけて、積和mの値が計算される。
In this way, as shown in the following equation (3), the value of the sum of products m is calculated over N cycles.

【0019】[0019]

【数1】 (Equation 1)

【0020】このmの値は、シグモイド関数変換器40
4の入力となる。シグモイド関数変換器404は、シグ
モイド関数の入出力特性をもった信号変換器である。こ
うしてシグモイド関数変換器404から出力信号Xj
出力される。
The value of m is calculated by the sigmoid function converter 40
4 is input. The sigmoid function converter 404 is a signal converter having sigmoid function input / output characteristics. Thus, the output signal Xj is output from the sigmoid function converter 404.

【0021】以上説明したデジタル回路によるニューラ
ルユニットの構成、及び動作は、各種バリエーションが
考えられる。但し、ここでは、これら全てを説明するこ
とはしない。いずれのバリエーションも、基本的には積
和演算器とシグモイド関数変換器から構成されているこ
とは同じである。
Various variations are conceivable for the configuration and operation of the neural unit using the digital circuit described above. However, all of these will not be described here. Both variations are basically the same in that they are composed of a product-sum operation unit and a sigmoid function converter.

【0022】なお、このようなデジタル回路によるニュ
ーラルユニットの構成については、例えば論文(安永
他、「ア セルフラーニング デジタル ニューラル
ネットワーク ユージング ウェーファ スケール エ
ル・エス・アイ」、アイトリプルイー ジャーナル オ
ブ ソリッド・ステート・サーキッツ、1993 Feb. vo
l28, no.2, pp106-114 (M.Yasunaga et.al “A S
elf-Learning Digitalneural Network Using Wafer
-Scale LSI”, IEEE Journal of Solid-State Ci
rcuits, Feb. 1993, vol28, no.2, pp106-114)等
の記載が参照される。
The construction of a neural unit using such a digital circuit is described in, for example, a paper (Yasunaga et al., "A Self-Learning Digital Neural Network"
Network Using Wafer Scale LSI ", I Triple E Journal of Solid State Circuits, 1993 Feb. vo
l28, no.2, pp106-114 (M. Yasunaga et.al “AS
elf-Learning Digitalneural Network Using Wafer
-Scale LSI ”, IEEE Journal of Solid-State Ci
rcuits, Feb. 1993, vol. 28, no. 2, pp. 106-114).

【0023】[0023]

【発明が解決しようとする課題】上記したような従来の
デジタル型ニューラルネットワークにおいては、各ニュ
ーラルユニットあたりN回の乗算の繰り返し処理を実行
する必要がある。このため、ネットワークの大規模化に
伴い、ニューラルユニットの結合数が増加するにつれ
て、Nも増加し、処理時間が非常に長くなってしまう、
という問題点を有している。
In the conventional digital neural network as described above, it is necessary to execute a repetition of N multiplications for each neural unit. For this reason, as the number of connected neural units increases with the increase in the scale of the network, N also increases, and the processing time becomes extremely long.
There is a problem that.

【0024】したがって、本発明は、上記事情に鑑みて
創案されたものであって、その目的は、積和の繰り返し
数を短縮することによって高速な処理を実現可能とし
た、ニューラルユニット演算方式とその装置を提供する
ことにある。
Accordingly, the present invention has been made in view of the above circumstances, and an object of the present invention is to provide a neural unit operation method capable of realizing high-speed processing by reducing the number of product-sum repetitions. It is to provide the device.

【0025】[0025]

【課題を解決するための手段】前記目的を達成するた
め、本発明のニューラルユニット演算方式は、配列型の
データである入力信号と配列型のデータであるシナプス
荷重値との乗算を所定回数行い、その結果を累和し、そ
の累和値をシグモイド関数変換して出力するというニュ
ーラルユニット演算方式において、非零の値を初期値と
して、正値のみ、もしくは負値のみを累和していき、予
め指定された値に累和値が到達したら累和を終了する。
In order to achieve the above object, a neural unit operation system according to the present invention performs a predetermined number of multiplications of an input signal as array data and a synapse load value as array data. In the neural unit operation method of summing the result, converting the sum value to a sigmoid function, and outputting the result, a non-zero value is used as an initial value, and only a positive value or a negative value is summed. When the sum reaches the value specified in advance, the sum ends.

【0026】また本発明のニューラルユニット装置は、
ニューラルネットワークの基本構成ユニットであり、デ
ジタル乗算器とデジタル加算器とによって配列型のデー
タである入力信号と、配列型のデータであるシナプス荷
重値の席輪演算を所定回数行い、その結果をシグモイド
関数変換して出力するニューラルユニット装置におい
て、非零の値を初期値として、正値のみ、もしくは負値
のみを累和していく積和演算器と、前記積和演算器の出
力がシグモイド関数の飽和域に入っているか否かを検出
する検出回路と、を備えることを特徴とする。
Further, the neural unit device of the present invention
A basic configuration unit of a neural network, a digital multiplier and a digital adder perform a predetermined number of seat wheel calculations of an array-type input signal and an array-type data of a synapse load value, and then use the result as a sigmoid. In a neural unit device that converts and outputs a function, a product-sum calculator that accumulates only positive values or only negative values using a non-zero value as an initial value, and an output of the product-sum calculator is a sigmoid function And a detection circuit for detecting whether or not the current value falls within the saturation range.

【0027】また、本発明のニューラルユニット演算装
置は、積和の繰り返し回数をNとしデジタル乗算器の出
力可能な値のうちの最小値を(L>0)としたと
き、−LNを初期値とし、L+(シナプス荷重値)×
(入力信号値)を累和していき、その累和値がシグモイ
ド関数の飽和域に入ったか否かを検出する検出器とを備
えることを特徴とする。
Further, the neural unit operation apparatus of the present invention, the number of repetitions of the product-sum and N the minimum value of the possible output values of the digital multiplier - when the L (L> 0), the -LN L + (synapse load value) x
(Input signal value), and a detector for detecting whether or not the accumulated value has entered the saturation range of the sigmoid function.

【0028】さらに本発明のニューラルユニット装置
は、積和の繰り返し回数をNとし、デジタル乗算器の出
力可能な値のうちの最大値をMとしたとき、MNを初期
値とし、−M+(シナプス荷重値)×(入力信号値)を
累和していき、その累和値がシグモイド関数の飽和域に
入ったか否かを検出する検出器とを備えることを特徴と
する。
Further, in the neural unit device of the present invention, when the number of repetitions of the sum of products is N and the maximum value among the values that can be output from the digital multiplier is M, MN is set to an initial value, and -M + (synapse (A load value) × (input signal value), and a detector for detecting whether or not the accumulated value is within a saturation range of the sigmoid function.

【0029】そして本発明のニューラルユニット装置
は、シナプス荷重値メモリと、前記シナプス荷重値メモ
リの出力と入力信号の積を計算する乗算器と、前記乗算
器の出力値と定数値と加算器の出力値とを入力とし、桁
上げと中間和とを出力するCSAと、前記CSAの桁上
げ出力と累算の初期値とを入力とするセレクタと、前記
セレクタの出力と前記CSAの中間和とを入力とする加
算器と、前記加算器の出力を入力とするシグモイド関数
変換器と、前記加算器の出力を入力とする飽和判定器と
から構成されることを特徴とする。
The neural unit apparatus according to the present invention comprises a synapse load value memory, a multiplier for calculating a product of an output of the synapse load value memory and an input signal, and an output of the multiplier, a constant value, and an adder. A CSA that receives an output value and outputs a carry and an intermediate sum, a selector that receives a carry output of the CSA and an initial value of accumulation, an output of the selector and an intermediate sum of the CSA, , A sigmoid function converter receiving the output of the adder as an input, and a saturation determiner receiving the output of the adder as an input.

【0030】[0030]

【発明の実施の形態】本発明の実施の形態及び実施例に
ついて以下に順を追って説明する。まず、本発明の原理
を以下に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments and examples of the present invention will be described below in order. First, the principle of the present invention will be described below.

【0031】第jニューラルユニット(図3参照)にお
いて計算される積Wjiiは、一般にその値が次式
(4)の範囲にある。
The value of the product W ji X i calculated in the j-th neural unit (see FIG. 3) is generally in the range of the following equation (4).

【0032】 −L≦Wjii≦M (L、M≧0) …(4)[0032] -L ≦ W ji X i ≦ M (L, M ≧ 0) ... (4)

【0033】L、Mの値は、WJiとXiを表現する際の
ビット長によって決定される。例えばWjiとXiが、ど
ちらも、4ビットの数値部(負数は絶対値であらわす)
と1ビットの符号部をもった2進数で表現されていると
しよう。
The values of L and M are determined by the bit length when expressing W Ji and X i . For example, W ji and X i are both 4-bit numerical parts (negative numbers represent absolute values)
And a binary number with a 1-bit sign.

【0034】すると、 −15≦Wji≦15 −15≦Wi≦15 であるから、その積については、 −225≦Wjii≦225 となる。すなわち、L=225、M=225である。[0034] Then, since it is -15 ≦ W ji ≦ 15 -15 ≦ W i ≦ 15, for the product becomes -225 ≦ W ji X i ≦ 225 . That is, L = 225 and M = 225.

【0035】このように、L、Mの値は、Wとiiを表
現する際のビット長によって決定される。
The value of the thus, L, M are determined by the bit length in representing the W and i X i.

【0036】さて本発明においては、ニューラルユニッ
トが実行する積和演算において、その初期値を−LNと
する。ここで、Nは、積和の繰り返し回数である。そし
て従来とは異なり、L+Wjiiを毎回足していく。す
なわち、次式(5)によってmを計算する。
In the present invention, the initial value is -LN in the product-sum operation performed by the neural unit. Here, N is the number of times the product-sum is repeated. And unlike conventional, going by adding every time the L + W ji X i. That is, m is calculated by the following equation (5).

【0037】[0037]

【数2】 (Equation 2)

【0038】ここで、毎回加算される数値(L+Wji
i)は、必ず正または0の数(非負値)であることに注
意する。
Here, the numerical value added each time (L + WjiX
Note that i ) is always a positive or zero number (non-negative value).

【0039】さてシグモイド関数の形状(図2)に注意
すると、これは、入力mの正側および負側で値が飽和し
ている。したがって、初期値を−LNとして、順にL+
jii(i=1、2、…、N)を加算していく過程に
おいて、最終項(第N項)まで至らなくても、途中の第
k項までの和の値(次式(6)参照)が、例えば図2に
おける飽和領域aに入っていたならば、以降の乗算と累
和計算は省略できる。
Now, paying attention to the shape of the sigmoid function (FIG. 2), the value is saturated on the positive and negative sides of the input m. Therefore, assuming that the initial value is -LN, L +
In the process of adding W ji X i (i = 1, 2,..., N), the sum value up to the k-th term in the middle (the following equation (Eq. 6), for example, if it falls within the saturation region a in FIG. 2, the subsequent multiplication and accumulation calculation can be omitted.

【0040】[0040]

【数3】 (Equation 3)

【0041】なぜなら第k+1項以降も、正または零の
値しか加算されないので、最終結果は、必ず、飽和領域
aにあることになる。そして飽和領域では、シグモイド
関数の出力値はほとんど変わらないからである。すなわ
ち、積和演算結果が飽和領域に入ったところで計算を中
止しても、最後まで計算を繰り返したときに比べてほと
んど違わない値が得られる。
Since only positive or zero values are added after the (k + 1) -th term, the final result is always in the saturation region a. Then, in the saturation region, the output value of the sigmoid function hardly changes. That is, even if the calculation is stopped when the product-sum operation result enters the saturation region, a value that is almost the same as when the calculation is repeated to the end is obtained.

【0042】よって、上式(3)の計算のために積和を
繰り返し実行している途中で、たとえN項全ての積和を
行わなくても、繰り返しの途中で飽和領域aに入ったな
らば計算を終了することによって、積和の繰り返し回数
を削減することができる。
Therefore, if the product sum is repeatedly executed for the calculation of the above equation (3), and if the product sum of all the N terms is not performed, and if the product enters the saturation region a during the iteration, By terminating the calculation, the number of product-sum repetitions can be reduced.

【0043】もちろん、積和の最終結果がいつも飽和域
にあるとは限らない。その場合は、N回の繰り返し計算
が必要である。しかし、ネットワーク全体で平均すれ
ば、積和計算の繰り返し数は削減されるであろうから、
結果としてNが増大しても、従来構成に比べて、処理時
間が短いニューラルネットワーク装置が実現できる。
Of course, the final product-sum result is not always in the saturation region. In that case, N repeated calculations are required. However, averaging over the entire network would reduce the number of product-sum iterations,
As a result, even if N increases, a neural network device with a shorter processing time than the conventional configuration can be realized.

【0044】上記の原理に基づく本発明のニューラルユ
ニット演算方式は、その好ましい実施の形態において、
非零の値を初期値として、正値のみ、もしくは負値のみ
を累和していき、累和値が予め指定した値に到達したら
累和を終了する、ことを特徴とする。
The neural unit operation method according to the present invention based on the above-described principle, in its preferred embodiment,
With a non-zero value as an initial value, only the positive value or only the negative value is accumulated, and when the accumulated value reaches a predetermined value, the accumulation is terminated.

【0045】また、本発明のニューラルユニット装置
は、その好ましい実施の形態において、ニューラルネッ
トワークの基本構成ユニットをなす、デジタル乗算器
(図1の102)とデジタル加算器(図1の103)
と、によって、配列型のデータである入力信号と配列型
のデータであるシナプス荷重値の乗算を所定回数行い、
その結果を累和し、その累和値をシグモイド関数変換し
て出力するニューラルユニット装置において、非零の値
を初期値として正値のみ、もしくは負値のみを、累和し
ていき、加算器の出力がシグモイド関数の飽和域に入っ
ているか否かを検出する検出回路(図1の109)と、
を備える。
In a preferred embodiment of the neural unit apparatus according to the present invention, a digital multiplier (102 in FIG. 1) and a digital adder (103 in FIG. 1) which constitute basic constituent units of the neural network.
With, by performing a predetermined number of times of multiplication of the input signal which is array type data and the synapse load value which is array type data,
In a neural unit device that accumulates the result, converts the accumulated value into a sigmoid function, and outputs the result, only the positive value or only the negative value is accumulated with a non-zero value as an initial value, and the adder is added. A detection circuit (109 in FIG. 1) for detecting whether or not the output of sigmoid function falls within the saturation range of the sigmoid function
Is provided.

【0046】より詳細には、本発明のニューラルユニッ
ト装置は、その好ましい実施の形態において、積和の繰
り返し回数をNとし、デジタル乗算器(図1の102)
の出力可能な値のうちの最小値をLとしたとき、−LN
を初期値とし、L+(シナプス荷重値Wji)×(入力信
号値Xi)を累和していき、検出回路(図1の109)
において、この累和値がシグモイド関数の飽和域に入っ
たか否かを検出する。あるいは、積和の繰り返し回数を
Nとし、デジタル乗算器の出力可能な値のうちの最大値
をMとしたとき、MNを初期値とし、−M+(シナプス
荷重値Wji)×(入力信号値Xi)を累和していき、検
出回路(図1の109)において、その累和値がシグモ
イド関数の飽和域に入っているか否かを検出する。
More specifically, in the neural unit apparatus of the present invention, in a preferred embodiment, the number of product-sum repetitions is N, and a digital multiplier (102 in FIG. 1) is used.
When the minimum value among the values that can be output is L, -LN
Is used as an initial value, L + (synapse load value W ji ) × (input signal value X i ) is accumulated, and a detection circuit (109 in FIG. 1)
, It is detected whether or not this sum value has entered the saturation range of the sigmoid function. Alternatively, when the number of product-sum repetitions is N and the maximum value among the values that can be output from the digital multiplier is M, MN is set as an initial value, and -M + (synaptic load value W ji ) × (input signal value X i ) are accumulated, and a detection circuit (109 in FIG. 1) detects whether or not the accumulated value falls within the saturation range of the sigmoid function.

【0047】[0047]

【実施例】上記した本発明の実施の形態について更に詳
細に説明すべく、本発明の実施例について図面を参照し
て以下に説明する。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an embodiment of the present invention;

【0048】図1は、本発明の一実施例の構成を示す図
である。本発明の一実施においては、上記従来技術で説
明したのと同様に、図1に示すニューラルユニットを第
jニューラルユニット(図3参照)とし、このニューラ
ルユニットに、第1〜第Nニューラルユニットが、それ
ぞれ信号X1〜XNを供給しているものとする。また第1
〜第Nニューラルユニットとこの第jニューラルユニッ
トとの間のシナプス荷重値をそれぞれWj1、Wj2
j3、…、WjNとする。信号X1〜XN、及びシナプス荷
重値Wj1〜WjNはそれぞれ、適当なビット長の2進数に
よって表現されているものとする。シナプス荷重値メモ
リ101にはWj1〜WjNが格納されている。
FIG. 1 is a diagram showing the configuration of one embodiment of the present invention. In one embodiment of the present invention, the neural unit shown in FIG. 1 is referred to as a j-th neural unit (see FIG. 3), and the neural unit includes first to N-th neural units, as described in the related art. , Are supplied with signals X 1 to X N , respectively. Also the first
The synapse load values between the N-th neural unit and the j-th neural unit are W j1 , W j2 ,
W j3 ,..., W jN . Signals X 1 to X N, and the synapse load value W j1 to W-jN respectively assumed to be represented by a binary number of suitable bit length. W j1 to W jN are stored in the synapse load value memory 101.

【0049】N個のニューラルユニットからの出力信号
1〜XNは、順番に入力信号線100に供給され、ま
た、これに同期して、シナプス荷重値メモリ101か
ら、Wj1、Wj2、…、WjNが順番に読み出される。
The output signals X 1 to X N from the N neural units are sequentially supplied to the input signal line 100, and in synchronism therewith , the synapse load value memory 101 outputs W j1 , W j2 , .., W jN are sequentially read.

【0050】すなわち第1サイクルでは、入力信号線1
00にX1が供給され、シナプス荷重値メモリ101か
らはWj1が読み出され、その両者の積が乗算器102に
よって計算される。
That is, in the first cycle, the input signal line 1
X 1 is supplied to 00, W j1 is read from the synapse load value memory 101, and the product of the two is calculated by the multiplier 102.

【0051】つづいて第2サイクルでは同様にX2とW
j2の積が計算される。
Subsequently, in the second cycle, similarly, X 2 and W
The product of j2 is calculated.

【0052】さて加算器103は累和を計算するもので
あるが、従来構成では累和計算の初期値は零であったの
に対し、本実施例では、初期値は−LNという値とす
る。ここで、Lは、本発明の原理として既に説明したよ
うに、Wjiiの最小値である。初期値をセットするこ
とは、セレクタ106によって容易に実現できる。すな
わち、累和計算の一番最初だけはセレクタ106が値−
LNを選択して加算器103の入力とし、それ以降は、
順番にWj11、Wj22が累算されていくようにすれば
よい。
The adder 103 calculates the sum. In the conventional configuration, the initial value of the sum calculation is zero, whereas in the present embodiment, the initial value is -LN. . Here, L is as previously described as the principles of the present invention, the minimum value of W ji X i. Setting the initial value can be easily realized by the selector 106. That is, only at the very beginning of the cumulative sum calculation, the selector 106
LN is selected and input to the adder 103, and thereafter,
W j1 X 1 and W j2 X 2 may be sequentially accumulated.

【0053】CSA105は、いわゆるキャリー・セー
ブ・アダー(Carrier Save Adeer;
桁上げ保存加算器)であって、3つの数を入力して、こ
れらを加算し2つの数、すなわち、桁上げと中間和を出
力する。図1を参照すると、CSA105は、加算器1
05の出力値、乗算器102の出力値(Wjii)、及
びLを入力として、桁上げ107と中間和108とを出
力する。両者は加算器103によって加算される。こう
して毎サイクルごとにL+Wjiiが加算されていく。
以上のようにすることで、第kサイクルにおける加算器
103の出力は、本発明の原理として既に説明したよう
に(上式(6)参照)、以下の値になる。
The CSA 105 is a so-called Carrier Save Adder;
A carry-save adder), which inputs three numbers, adds them, and outputs two numbers, that is, a carry and an intermediate sum. Referring to FIG. 1, the CSA 105 includes an adder 1
The output value of 05, the output value of the multiplier 102 (W ji X i), and as input L, and the outputs of the carry 107 and intermediate sum 108. Both are added by the adder 103. L + W ji X i in every cycle in this way is going to be added.
As described above, the output of the adder 103 in the k-th cycle has the following value, as already described as the principle of the present invention (see the above equation (6)).

【0054】[0054]

【数4】 (Equation 4)

【0055】加算器103の出力は、シグモイド関数変
換器104の入力となる。そして毎サイクルごとに、飽
和判定器109は、加算器103の出力値が飽和領域a
(図2参照)に入っているか否かをチェックする。
The output of the adder 103 becomes the input of the sigmoid function converter 104. Then, for each cycle, the saturation determiner 109 sets the output value of the
(See FIG. 2).

【0056】もしも飽和領域aに入ったならば、飽和判
定器109は、計算終了信号140を発信する。計算終
了信号140が発信されると、このニューラルユニット
は、たとえ乗算回数がN回に達していなくても処理を終
了する。
If the saturation has entered the saturation region a, the saturation determiner 109 sends a calculation end signal 140. When the calculation end signal 140 is transmitted, the neural unit ends the process even if the number of multiplications has not reached N.

【0057】このように、たとえN回までの計算を行わ
なくても、出力Xjの値は、すでに充分正確な値(すな
わちN回計算を行ったときの値)になっていることは、
本発明の原理として既に説明した通りである。
Thus, even if the calculation is not performed up to N times, the value of the output X j is already a sufficiently accurate value (that is, the value when the calculation is performed N times).
The principle of the present invention is as described above.

【0058】なお、以上の説明はすべて、累和の初期値
として、−LNを使用したが、全く同じ原理によって、
累和の初期値を、MNから始めてもよい。
In the above description, -LN is used as the initial value of the summation.
The initial value of the sum may start from MN.

【0059】ここで、Mは、上式(4)で定義されてい
るとおり、Wjiiの最大値である。そして、累和して
いく値は−M+Wjiiとすれば良い。
[0059] Here, M is as defined in the above formula (4), the maximum value of W ji X i. Then, the value to continue to Ruiwa may be set to -M + W ji X i.

【0060】すなわち次式(7)によって、mを計算す
る。
That is, m is calculated by the following equation (7).

【0061】[0061]

【数5】 (Equation 5)

【0062】この場合は、正の最大値MNからはじまっ
て、毎回負または零の数のみが加算されていく。よっ
て、第k項までの途中結果が、図2における飽和領域b
に入ったならば、計算を終了する。こうしてもよいこと
は、第k+1項以降も負または零の値しか加算されない
ので、最終結果は、必ず、飽和領域bの中にあり、途中
で計算を中止しても、最後まで計算を繰り返したときに
比べてほとんど違わない値が得られるためである。
In this case, starting from the maximum positive value MN, only a negative or zero number is added each time. Therefore, the intermediate result up to the k-th term is the saturation region b in FIG.
If entered, the calculation ends. What may be done is that only negative or zero values are added after the (k + 1) th term, so the final result is always in the saturation region b, and even if the calculation is stopped halfway, the calculation is repeated to the end. This is because a value that is almost the same as that of the time is obtained.

【0063】この方法は、図1に示した実施例におい
て、初期値120をMNとし、CSAの入力130を−
Mとすることで実現できる。
In this method, in the embodiment shown in FIG. 1, the initial value 120 is set to MN, and the input 130 of the CSA is
M can be realized.

【0064】[0064]

【発明の効果】以上説明したように、本発明によれば、
従来のニューラルユニットではN回必要であった積和繰
り返し回数を短縮することができるため、高速なニュー
ラルユニットが実現することができるという効果を奏す
る。
As described above, according to the present invention,
Since the number of product-sum repetitions required N times in the conventional neural unit can be reduced, a high-speed neural unit can be realized.

【0065】また本発明によれば、ニューラルユニット
の数を増やして大規模なニューラルネットワークを構成
した場合に、その処理時間の増加を抑えることができ
る、という効果を奏する。
Further, according to the present invention, when a large-scale neural network is constructed by increasing the number of neural units, it is possible to suppress an increase in processing time.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明のニューラルユニットの一実施例の構成
を示す図である。
FIG. 1 is a diagram showing a configuration of an embodiment of a neural unit according to the present invention.

【図2】シグモイド関数の形状を示す図である。FIG. 2 is a diagram showing a shape of a sigmoid function.

【図3】ニューラルネットワークの基本構成を示す図で
ある。
FIG. 3 is a diagram showing a basic configuration of a neural network.

【図4】デジタル回路によるニューラルユニットの従来
の構成の一例を示す図である。
FIG. 4 is a diagram showing an example of a conventional configuration of a neural unit using a digital circuit.

【符号の説明】[Explanation of symbols]

100、400 入力信号線 101、401 シナプス荷重値メモリ 102、402 乗算器 103、403 加算器 104、404 シグモイド関数変換器 105 CSA 106 セレクタ 107 桁上げ 108 中間和 109 飽和検出器 110、410 出力信号Xj 120 初期値(−LN) 130 L 140 計算終了信号 301 第jニューラルユニット 302 第Aニューラルユニット 303 第Bニューラルユニット 304 第Cニューラルユニット 305 ニューラルユニット 310 信号Xj 311 信号XA 312 信号XB 313 信号XC 100, 400 Input signal line 101, 401 Synapse load value memory 102, 402 Multiplier 103, 403 Adder 104, 404 Sigmoid function converter 105 CSA 106 Selector 107 Carry 108 Intermediate sum 109 Saturation detector 110, 410 Output signal X j 120 initial value (-LN) 130 L 140 calculation end signal 301 j-th neural unit 302-A neural unit 303 first B neural unit 304 first C neural unit 305 neural unit 310 signals X j 311 signal X A 312 signal X B 313 Signal X C

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】ニューラルネットワークの基本構成ユニッ
トをなす、デジタル乗算器とデジタル加算器と、によっ
て、配列型のデータである入力信号と配列型のデータで
あるシナプス荷重値の乗算を所定回数行い、その結果を
累和し、その累和値をシグモイド関数変換して出力する
ニューラルユニット装置において、 積和演算器の出力がシグモイド関数の飽和域に入ってい
るか否かを検出する検出回路を備え 、 積和の繰り返し回数をNとし、前記デジタル乗算器の出
力可能な値のうちの最小値を(但し、L>0)とし
たとき、 −LNを初期値とし、 L+(シナプス荷重値)×(入力信号値)を累和してい
き、 前記検出回路において、前記累和値がシグモイド関数の
飽和域に入ったか否かを検出する、ことを特徴とするニ
ューラルユニット装置。
1. A basic configuration unit of a neural network.
Digital multiplier and digital adder
Input signal, which is array type data, and array type data.
Multiplication of a certain synapse load value is performed a predetermined number of times, and the result is
Sum and convert the sum to a sigmoid function and output
In the neural unit device, the output of the product-sum operation unit falls within the saturation range of the sigmoid function.
A detection circuit for detecting whether or not Luke, the number of repetitions of the product-sum is N, the minimum value of the possible output values of the digital multiplier - L (where, L> 0) and the time, - LN is set as an initial value, and L + (synapse load value) × (input signal value) is accumulated, and the detection circuit detects whether or not the accumulated value is within a saturation range of a sigmoid function. A neural unit device characterized by the following.
【請求項2】ニューラルネットワークの基本構成ユニッ
トをなす、デジタル乗算器とデジタル加算器と、によっ
て、配列型のデータである入力信号と配列型のデータで
あるシナプス荷重値の乗算を所定回数行い、その結果を
累和し、その累和値をシグモイド関数変換して出力する
ニューラルユニット装置において、 積和演算器の出力がシグモイド関数の飽和域に入ってい
るか否かを検出する検出回路を備え 、 積和の繰り返し回数をNとし、前記デジタル乗算器の出
力可能な値のうちの最大値をMとしたとき、 MNを初期値とし、 −M+(シナプス荷重値)×(入力信号値)を累和して
いき、 前記検出回路において、前記累和値がシグモイド関数の
飽和域に入っているか否かを検出する、ことを特徴とす
るニューラルユニット装置。
2. A basic configuration unit of a neural network.
Digital multiplier and digital adder
Input signal, which is array type data, and array type data.
Multiplication of a certain synapse load value is performed a predetermined number of times, and the result is
Sum and convert the sum to a sigmoid function and output
In the neural unit device, the output of the product-sum operation unit falls within the saturation range of the sigmoid function.
A detection circuit for detecting whether or not the multiplication and accumulation is repeated, where N is the number of repetitions of the sum of products, and M is the maximum value among the values that can be output from the digital multiplier. Neural unit device, wherein a sum of (synapse load value) × (input signal value) is accumulated, and the detection circuit detects whether or not the accumulated value is within a saturation range of a sigmoid function. .
JP35436996A 1996-12-19 1996-12-19 Neural unit operation method and device Expired - Fee Related JP3292073B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35436996A JP3292073B2 (en) 1996-12-19 1996-12-19 Neural unit operation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35436996A JP3292073B2 (en) 1996-12-19 1996-12-19 Neural unit operation method and device

Publications (2)

Publication Number Publication Date
JPH10187648A JPH10187648A (en) 1998-07-21
JP3292073B2 true JP3292073B2 (en) 2002-06-17

Family

ID=18437096

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35436996A Expired - Fee Related JP3292073B2 (en) 1996-12-19 1996-12-19 Neural unit operation method and device

Country Status (1)

Country Link
JP (1) JP3292073B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11630997B2 (en) 2018-01-23 2023-04-18 Samsung Electronics Co., Ltd. Method and apparatus with bit-serial data processing of a neural network

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6556768B2 (en) * 2017-01-25 2019-08-07 株式会社東芝 Multiply-accumulator, network unit and network device
WO2020194594A1 (en) 2019-03-27 2020-10-01 Tdk株式会社 Neural network calculation processing device and neural network calculation processing method
US20230053294A1 (en) * 2021-08-13 2023-02-16 Taiwan Semiconductor Manufacturing Co., Ltd. Bitwise product-sum accumulations with skip logic

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04112362A (en) * 1990-09-03 1992-04-14 Nippon Telegr & Teleph Corp <Ntt> Accumulation circuit
JPH05128284A (en) * 1991-11-07 1993-05-25 Matsushita Electric Ind Co Ltd Neuro-processor
JPH0830572A (en) * 1994-07-18 1996-02-02 Nippon Telegr & Teleph Corp <Ntt> Neural network circuit and arithmetic method using the circuit
JPH07210533A (en) * 1994-01-19 1995-08-11 Nippon Telegr & Teleph Corp <Ntt> Neural network circuit and arithmetic method using same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11630997B2 (en) 2018-01-23 2023-04-18 Samsung Electronics Co., Ltd. Method and apparatus with bit-serial data processing of a neural network
US11880768B2 (en) 2018-01-23 2024-01-23 Samsung Electronics Co., Ltd. Method and apparatus with bit-serial data processing of a neural network

Also Published As

Publication number Publication date
JPH10187648A (en) 1998-07-21

Similar Documents

Publication Publication Date Title
KR920007505B1 (en) Multiplier by using neural network
US10417460B1 (en) Low power analog vector-matrix multiplier
EP0629969A1 (en) Artificial neuron and method of using same
JPH09510805A (en) Method and apparatus for performing fast Hadamard transform
US6370556B1 (en) Method and arrangement in a transposed digital FIR filter for multiplying a binary input signal with tap coefficients and a method for designing a transposed digital filter
CN110109646A (en) Data processing method, device and adder and multiplier and storage medium
KR0168975B1 (en) Method and apparatus for processing using neural network circuits and systems
CN112698811A (en) Neural network random number generator sharing circuit, sharing method and processor chip
JP3292073B2 (en) Neural unit operation method and device
US7610326B2 (en) Arithmetic circuit for calculating a cumulative value as a result of parallel arithmetic processing
Ando et al. Dither nn: An accurate neural network with dithering for low bit-precision hardware
US20220247425A1 (en) Architecture for Multiplier Accumulator using Unit Elements for multiplication, bias, accumulation, and analog to digital conversion over a shared Charge Transfer Bus
CN114548387A (en) Method for executing multiplication operation by neural network processor and neural network processor
US6728745B1 (en) Semiconductor circuit for arithmetic operation and method of arithmetic operation
KR20200068560A (en) Neuromorphic arithmetic device and operating method thereof
Rasanjani et al. Fundamental Digital Module Realization Using RTL Design for Quantum Mechanics
US12014152B2 (en) Multiplier-accumulator unit element with binary weighted charge transfer capacitors
Al-Yateem et al. Digital Filter based Adder Module Realization High-Speed Switching Functions
US20220075598A1 (en) Systems and Methods for Numerical Precision in Digital Multiplier Circuitry
CN113988279A (en) Output current reading method and system of storage array supporting negative value excitation
CN116402106B (en) Neural network acceleration method, neural network accelerator, chip and electronic equipment
US20200226456A1 (en) Neuromorphic arithmetic device and operating method thereof
JPH0981541A (en) Accumulator
CN110705196A (en) Error-free adder based on random calculation
Zakaria et al. Digital Filter Design: Novel Multiplier Realization

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020226

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080329

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090329

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090329

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100329

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110329

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110329

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120329

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120329

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130329

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130329

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140329

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees