亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? alphaneuron.cpp

?? amygdata的神經網絡算法源代碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/***************************************************************************                          alphaneuron.cpp  -  description                             -------------------    copyright            : (C) 2001 by Matt Grover    email                : mgrover@amygdala.org ***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * ***************************************************************************/#include <cmath>#include "alphaneuron.h"#include "euler.h"#include "network.h"#include "functionlookup.h"#include "dendrite.h"#include "logging.h"#include "utilities.h"#include <iostream>using namespace std;using namespace Amygdala;unsigned int AlphaNeuron::pspStepSize = 0;unsigned int AlphaNeuron::pspLSize = 0;///////////////////////////////////////////////////////// AlphaNeuronProperties/////////////////////////////////////////////////////AlphaNeuronProperties::AlphaNeuronProperties():	SpikingNeuronProperties(){}AlphaNeuronProperties::AlphaNeuronProperties(bool initializePhysicalProps):	SpikingNeuronProperties(initializePhysicalProps){}AlphaNeuronProperties::AlphaNeuronProperties(const AlphaNeuronProperties& rhs):	SpikingNeuronProperties(rhs){	memTimeConst = rhs.memTimeConst;	eSynTimeConst = rhs.eSynTimeConst;	iSynTimeConst = rhs.iSynTimeConst;}AlphaNeuronProperties::~AlphaNeuronProperties(){}AlphaNeuronProperties* AlphaNeuronProperties::Copy() const{	return new AlphaNeuronProperties(*this);}void AlphaNeuronProperties::SetProperty(string& name, string& value){    // Properties:    // memTimeConst    // eSynTimeConst    // iSynTimeConst    if (!name.compare("membraneTimeConst")) {        memTimeConst = atof(value.c_str());    }    else if (!name.compare("eSynapticTimeConst")) {        eSynTimeConst = atof(value.c_str());    }    else if (!name.compare("iSynapticTimeConst")) {        iSynTimeConst = atof(value.c_str());    }    else {        NeuronProperties::SetProperty(name, value);    }}map< string, string > AlphaNeuronProperties::GetPropertyMap() const{    map< string, string > propMap = NeuronProperties::GetPropertyMap();    propMap["membraneTimeConst"] = Utilities::ftostr(memTimeConst);    propMap["eSynapticTimeConst"] = Utilities::ftostr(eSynTimeConst);    propMap["iSynapticTimeConst"] = Utilities::ftostr(iSynTimeConst);        return propMap;}///////////////////////////////////////////////////////// AlphaNeuron/////////////////////////////////////////////////////AlphaNeuron::AlphaNeuron(AmIdInt neuronId, const AlphaNeuronProperties& neuronProps):    SpikingNeuron(neuronId, neuronProps),    histBeginIdx(0),    maxThreshCrs(0),    convergeRes(0){    epspLookup = 0;    edPspLookup = 0;    ipspLookup = 0;    idPspLookup = 0;        if (!pspStepSize) {	    Init();    }        InitLookup();}AlphaNeuron::~AlphaNeuron(){}void AlphaNeuron::Init(){	//pspStepSize = Network::TimeStepSize()/10;	pspStepSize = Network::TimeStepSize();	pspLSize = 100000/pspStepSize;		// 100ms / step size		LOGGER(3, "pspStepSize: " << pspStepSize << " pspLSize: " << pspLSize)}void AlphaNeuron::SetProperties(AlphaNeuronProperties* props){	delete neuronProps;	neuronProps = props->Copy();}void AlphaNeuron::SpikeCleanup(){	// reset inputHist vector	inputHist.clear();	histBeginIdx = 0;}void AlphaNeuron::ProcessInput(const AmTimeInt& inTime){    unsigned int i, iterate, converged, histSize, tblIndex;    AmTimeInt calcTime, funcTime;    float currState = 0.0;    float currDeriv = 0.0;    float funcWeight = 0.0;    float stateDelta = 0.0;    float threshCrs = 0.0;    float lstThreshCrs = 0.0;    InputHist tmpInput;    // If the neuron is within a refractory period,    if ( (inTime - spikeTime) <= refPeriod ) {        if (inTime > refPeriod) {	        dendrite->ResetTrigger();            return;        }    }    iterate = 1;    converged = 0;    calcTime = 0;    funcTime = 0;    histSize = 0;    if (!maxThreshCrs) {        maxThreshCrs = pspLSize * pspStepSize;        LOGGER(5, "maxThreshCrs = " << maxThreshCrs)        // find the convergence resolution (the resolution at which two values        // of threshCrs are considered to be identical) -- must be <= simStepSize        if (simStepSize > pspStepSize) {            if (pspStepSize > (simStepSize / 2.0)) {                convergeRes = pspStepSize;            }            else {                convergeRes = simStepSize / 2.0;            }        }        else {            convergeRes = simStepSize;        }    }    calcTime = inTime;    inputTime = inTime;    currTime = inTime;    float inWeightPos, inWeightNeg;    dendrite->GetStimulationLevel(inWeightPos, inWeightNeg);    /*if (trainingMode) {        //inWeight = inputHeader->SumQueue(true, synapseHist, inTime);        dendrite->GetStimulationLevel(inWeightPos, inWeightNeg);    }    else {        //inWeight = inputHeader->SumQueue(true);        dendrite->GetStimulationLevel(inWeightPos, inWeightNeg);    }*/    tmpInput.time = inTime;    if (inWeightPos) {        tmpInput.weight = inWeightPos;        inputHist.push_back(tmpInput);    }    if (inWeightNeg) {        tmpInput.weight = inWeightNeg;        inputHist.push_back(tmpInput);    }        histSize = inputHist.size();    //LOG_WEIGHT_HIST(6)        i = 0;    // Use Newton's method to determine if and when the spike will occur    /**************************************************************************    *    1) Determine the membrane potential (currState) at time (calcTime -    *       inTimeHist[i]) by summing the state of each inTimeHist[]    *       (use pspLookup).    *    2) Find the derivative of the function for calcTime (dPspLookup).    *    3) Calculate intercept with thresholdPtnl.    *    4) Set new calcTime to time of intercept.    *    5) Repeat until:    *        a) Two successive iterations result in no change in calcTime.    *            (Converges)    *        b) The derivative of the function becomes negative.    *            (Does not converge)    **************************************************************************/    LOGGER(6, "NEURON " << nId << " Starting main loop...")    lstThreshCrs = float(calcTime);    while (iterate) {        currState = 0.0;        currDeriv = 0.0;        Utilities::RoundTime(calcTime, pspStepSize);        LOGGER(6, "calcTime: " << calcTime)        for (i=histBeginIdx; i<histSize; i++) {            tmpInput = inputHist[i];            funcTime = calcTime - tmpInput.time;            funcWeight = tmpInput.weight;            LOGGER(6, "funcTime: " << funcTime << "\n\tfuncWeight: " << funcWeight)            tblIndex = (funcTime / pspStepSize);            LOGGER(6, "tblIndex for psp lookups: " << tblIndex)            if (tblIndex < pspLSize) {                if ( funcWeight > 0.0 ) {                    currState = currState + (funcWeight * (epspLookup[tblIndex]));                    currDeriv = currDeriv + (funcWeight * (edPspLookup[tblIndex]));                }                else {                    currState = currState + (funcWeight * (ipspLookup[tblIndex]));                    currDeriv = currDeriv + (funcWeight * (idPspLookup[tblIndex]));                }            }            else {                if (calcTime <= inTime)                    ++histBeginIdx;            }        }        LOGGER(6, "currState: " << currState << "\n\tcurrDerive: " << currDeriv)        if ( (currDeriv < 0.0) && (currState < 1.0) ) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品爽啪视频| 麻豆国产精品一区二区三区 | 日韩中文字幕一区二区三区| 欧美激情在线免费观看| 日韩欧美中文字幕制服| 欧美videofree性高清杂交| 欧美精选一区二区| 日韩欧美一二三| 欧美精品一区二区蜜臀亚洲| 精品日韩欧美在线| 日本一二三四高清不卡| 综合色中文字幕| 一区二区三区四区亚洲| 午夜视频在线观看一区二区 | 国产农村妇女精品| 国产精品久久99| 亚洲女人的天堂| 日本不卡免费在线视频| 国产一区二区三区免费播放| 成人禁用看黄a在线| 色屁屁一区二区| 日韩欧美资源站| 国产日韩欧美不卡在线| 一区二区三区在线免费视频 | 国产激情偷乱视频一区二区三区| 国产一区二区三区在线观看免费| 成人久久18免费网站麻豆| 91福利在线观看| 精品国产制服丝袜高跟| 日韩美女视频一区| 麻豆91免费观看| 97se亚洲国产综合自在线观| 日韩午夜小视频| 国产精品第四页| 免费观看日韩av| 91丨九色丨黑人外教| 91精品综合久久久久久| 国产亚洲精品超碰| 日韩精彩视频在线观看| 成人午夜精品一区二区三区| 这里只有精品免费| 亚洲欧洲综合另类| 国产一区久久久| 欧美日韩视频在线第一区 | 精品奇米国产一区二区三区| 国产精品国产三级国产aⅴ中文| 日本欧美久久久久免费播放网| 成人免费视频国产在线观看| 日韩视频国产视频| 亚洲精品乱码久久久久久 | 午夜精品影院在线观看| 国产成人8x视频一区二区| 69堂精品视频| 尤物在线观看一区| 成人午夜激情片| 精品国产一区二区三区久久影院| 亚洲综合激情小说| 91在线精品一区二区| 26uuu亚洲| 麻豆专区一区二区三区四区五区| 欧美色区777第一页| 亚洲色图清纯唯美| av福利精品导航| 日本一区二区三区在线不卡| 国产一区福利在线| 久久天堂av综合合色蜜桃网| 日韩av在线播放中文字幕| 欧美性欧美巨大黑白大战| 亚洲视频资源在线| www.欧美日韩| 国产精品国产自产拍高清av | 亚洲人成在线播放网站岛国| 国产乱码精品一品二品| 精品日韩在线一区| 黄一区二区三区| 久久精品免视看| 成人性色生活片免费看爆迷你毛片| 久久嫩草精品久久久久| 国产自产v一区二区三区c| 精品99999| 成人精品一区二区三区四区| 中文字幕一区二区5566日韩| a在线欧美一区| 亚洲精品中文在线| 欧美久久一区二区| 极品尤物av久久免费看| 2020国产精品自拍| 成人深夜福利app| 亚洲日本一区二区| 欧美色精品在线视频| 日韩专区中文字幕一区二区| 精品少妇一区二区三区| 懂色av一区二区三区蜜臀| 国产精品国产自产拍在线| 91福利在线免费观看| 日韩国产高清影视| 久久一区二区视频| gogo大胆日本视频一区| 亚洲一区在线观看免费| 日韩一级黄色大片| 不卡的av网站| 日本不卡的三区四区五区| 精品国产91九色蝌蚪| 成人av在线资源网站| 亚洲妇女屁股眼交7| 精品电影一区二区| 91首页免费视频| 美国一区二区三区在线播放| 国产精品传媒入口麻豆| 欧美日本精品一区二区三区| 国产精品一区三区| 亚洲国产wwwccc36天堂| 精品国产一区二区三区四区四| 91在线丨porny丨国产| 日本亚洲天堂网| 亚洲欧美日韩综合aⅴ视频| 欧美大片拔萝卜| 欧洲精品中文字幕| 懂色一区二区三区免费观看| 日韩精品一级二级| 亚洲欧洲韩国日本视频| 精品sm在线观看| 欧美精品一二三| 色噜噜狠狠一区二区三区果冻| 久国产精品韩国三级视频| 亚洲欧美日韩一区| 国产欧美一区二区精品秋霞影院| 在线免费观看日本欧美| 成人激情视频网站| 国产真实乱对白精彩久久| 亚洲v日本v欧美v久久精品| 中文字幕一区二区三区四区| 26uuu久久天堂性欧美| 777久久久精品| 欧美综合亚洲图片综合区| 不卡高清视频专区| 国产成人精品一区二区三区四区| 午夜精品久久久| 一区二区三区四区在线免费观看| 中文字幕成人在线观看| 337p日本欧洲亚洲大胆色噜噜| 欧美喷水一区二区| 欧美午夜免费电影| 在线精品视频一区二区三四| 99视频精品全部免费在线| 大白屁股一区二区视频| 国产精品白丝jk白祙喷水网站| 麻豆成人在线观看| 久久精品理论片| 国产在线精品免费| 国产在线一区观看| 国产成人av在线影院| 国产高清不卡一区二区| 国产剧情av麻豆香蕉精品| 国产真实乱偷精品视频免| 国产精品一区二区三区四区| 狠狠网亚洲精品| 黑人巨大精品欧美一区| 国产一区二区0| 成人午夜视频在线| 91日韩在线专区| 欧美色图天堂网| 欧美猛男男办公室激情| 91麻豆精品91久久久久同性| 日韩欧美成人午夜| 久久嫩草精品久久久久| 国产精品丝袜久久久久久app| 中文字幕在线视频一区| 亚洲欧美一区二区三区孕妇| 亚洲永久免费视频| 美女精品一区二区| 国产精品77777| 91丨porny丨最新| 91精品国产高清一区二区三区蜜臀 | 国产iv一区二区三区| 成人app网站| 欧美日韩国产高清一区二区三区| 欧美日免费三级在线| 精品国产人成亚洲区| 欧美国产视频在线| 午夜一区二区三区视频| 九色综合狠狠综合久久| 不卡的av电影在线观看| 欧美人动与zoxxxx乱| 国产三级欧美三级| 亚洲一区二三区| 国产一区二区三区观看| 91国偷自产一区二区使用方法| 日韩欧美一级二级三级| 亚洲视频综合在线| 国产综合成人久久大片91| 色呦呦国产精品| 日韩精品专区在线影院重磅| 亚洲日本一区二区三区| 另类小说图片综合网| 91色婷婷久久久久合中文| 欧美一级爆毛片| 亚洲一区二区av在线| 国产一区二区三区久久久| 欧美视频一区二区|