📄 propgate.c
字号:
/**************************************************************************
**************************************************************************
*** ***
*** PROPGATE.C ***
*** ***
*** Notice: ***
*** This code is copyright (C) 1995 by David M. Skapura. It may ***
*** be used as is, or modified to suit the requirements of a ***
*** specific application without permission of the author. ***
*** There are no royalty fees for use of this code, as long ***
*** as the original author is credited as part of the final ***
*** work. In exchange for this royalty free use, the user ***
*** agrees that no guarantee or warantee is given or implied. ***
*** ***
*** ***
**************************************************************************
**************************************************************************/
void dot_product (layer *fromlayer, layer *tolayer)
{
int i, j;
float *wts, *outs, *ins, **connects;
outs = tolayer->outputs;
connects = tolayer->connects;
for (i=0; i<tolayer->units; i++)
{
outs[i] = 0;
wts = connects[i];
ins = fromlayer->outputs;
for (j=0; j<fromlayer->units; j++)
outs[i] = outs[i] + (wts[j] * ins[j]);
}
}
void one_to_one (layer *fromlayer, layer *tolayer)
{
int i, units;
float *outs, *ins;
outs = tolayer->outputs;
ins = fromlayer->outputs;
units = tolayer->units;
for (i=0; i<units; i++) outs[i] = ins[i];
}
void propagate (layer *fromlayer, layer *tolayer)
{
tolayer->propto (fromlayer, tolayer);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -