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

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

?? lsmtopology.cpp

?? amygdata的神經網絡算法源代碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/***************************************************************************                          lsmtopology.cpp  -  description                             -------------------    begin                : Wed Mar 30 2005    copyright            : (C) 2005 by Rudiger Koch    email                : rkoch@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 "lsmtopology.h"#include "spikeinput.h"#include "factory.h"#include "physicalproperties.h"#include "neuronproperties.h"#include "neuron.h"#include "spikingneuron.h"#include "inputneuron.h"#include "nconnector.h"#include "synapse.h"#include "synapseproperties.h"#include "utilities.h"#include "logging.h"#include <stdexcept>#include <cstdlib>namespace Amygdala {using namespace std;LSMTopology::LSMTopology(string name) :     Topology(name),    X(0), Y(0), Z(0),    lastInX(0), lastInY(0), lastInZ(0), lastInSide(0),    lastOutX(0), lastOutY(0), lastOutZ(0){}LSMTopology::~LSMTopology(){}Topology * LSMTopology::MakeInput(SpikeInput * sInput, unsigned int iNeurons){    if( X==0 || Y==0 || Z==0) throw runtime_error("No cube defined yet. Call MakeCube before attempting to create Input");    //TFactory * lsmInput = dynamic_cast<TFactory*> (Factory::GetRegistry().GetFactory("LSMTopology::Input"));    //if(!lsmInput) throw runtime_error("No LSMTopology::Input factory registered");    TopologyFactory<LSMTopology::Input> lsmInput;    Input* in = lsmInput("LSM Input");    input.push_back(in);        // Move the code that used to be in Input::MakeInput() to here since more than one Input    // object is now allowed.  Since we have to keep track of where input neurons have been added    // previously, it will be easier to do that here.    //in->MakeInput(sInput, X, Y, Z, iNeurons);    LOGGER(3, "Making Inputs");    unsigned int neuronCounter = 1;    unsigned int inputLocs = 2*X*Z + 2*Y*Z;    unsigned int totInputs = 0;        for (unsigned int i=0; i<input.size(); ++i) {        totInputs += input[i]->size();    }    totInputs += iNeurons;    if(totInputs > inputLocs)             throw runtime_error("Insufficient space for InputNeurons. Consider making the cube larger");        if (lastInSide == 0) {        int y=-1;        // distribute the InputNeurons alongside at the X-Z side of the cube (y == -1)        for(int x=lastInX; x < X; x++){            for(int z=lastInZ; z < Z; z++){                InputNeuron * inNrn = in->MakeInputNeuron(x, y, z);                sInput->AddNeuron(inNrn);                lastInZ = z;                if(++neuronCounter > iNeurons) return in;            }            lastInZ = 0;               lastInX = x;        }        lastInX = 0;        lastInZ = 0;        lastInSide = 1;    }        if (lastInSide == 1) {        int y=Y;        // distribute the InputNeurons alongside at the X-Z side of the cube (y == Y)        for(int x=lastInX; x < X; x++){            for(int z=lastInZ; z < Z; z++){                InputNeuron * inNrn = in->MakeInputNeuron(x, y, z);                sInput->AddNeuron(inNrn);                lastInZ = z;                if(++neuronCounter > iNeurons) return in;            }               lastInZ = 0;            lastInX = x;        }        lastInX = 0;        lastInZ = 0;        lastInSide = 2;    }        if (lastInSide == 2) {        // if there are still more input neurons        // distribute them alongside at the X-Y side of the cube (z == -1)        int z=-1;        for(int x=lastInX; x < X; x++){            for(int y=lastInY; y < Y; y++){                InputNeuron * inNrn = in->MakeInputNeuron(x, y, z);                sInput->AddNeuron(inNrn);                lastInY = y;                if(++neuronCounter > iNeurons) return in;            }               lastInY = 0;            lastInX = x;        }        lastInX = 0;        lastInSide = 3;    }        if (lastInSide == 3) {        // if there are still more input neurons        // distribute them alongside at the X-Y side of the cube (z == Z)        int z=Z;        for(int x=lastInX; x < X; x++){            for(int y=lastInY; y < Y; y++){                InputNeuron * inNrn = in->MakeInputNeuron(x, y, z);                sInput->AddNeuron(inNrn);                lastInY = y;                if(++neuronCounter > iNeurons) return in;            }               lastInY = 0;            lastInX = x;        }        lastInX = 0;        lastInSide = 4;    }        return in;}Topology * LSMTopology::MakeReadout(const string & nType, unsigned int oNeurons){    if( X==0 || Y==0 || Z==0) throw runtime_error("No cube defined yet. Call MakeCube before attempting to create Output");    TFactory * lsmOutput = dynamic_cast<TFactory*> (Factory::GetRegistry().GetFactory("LSMTopology::Output"));    if(!lsmOutput) throw runtime_error("No LSMTopology::Output factory registered");    Output* out = dynamic_cast<Output*> (lsmOutput->MakeTopology("LSM Output"));    output.push_back(out);        // Move the code that used to be in Output::MakeReadout() to here since more than one Output    // object is now allowed.  Since we have to keep track of where neurons have been added    // previously, it will be easier to do that here.    //out->MakeReadout(nType, X, Y, oNeurons);    LOGGER(3, "Making Outputs");    unsigned int neuronCounter = 1;    NFactory * nf =  dynamic_cast<NFactory*> (Factory::GetRegistry().GetFactory(nType));    if (nf == NULL) throw runtime_error("No neuron type " + nType + " registered!");    NeuronProperties * nProps = nf->MakeNeuronProperties(true);    PhysicalProperties * pProps = nProps->GetPhysicalProps();    // distribute the OutputNeurons alongside at the Y-Z side of the cube starting at X+1, 0, 0    for (int z=lastOutZ; true; z++){        for (int y = lastOutY; y < Y; y++){            pProps->SetPosition(X + 1, y, z);            Neuron * n = nf->MakeNeuron(Network::GetNetworkRef()->GetNewNeuronId(), nProps, out);            OutputManager::AddNeuronToGroup(n, OUTPUTGROUP);            LOGGER(4, "Output neuron at " << X+1 << ", " << y << ", " << z);            lastOutY++;            if(++neuronCounter > oNeurons) return out;        }        lastOutY=0;        lastOutZ++;    }        return out;}Topology * LSMTopology::MakeReadout(NFactory* nf, NeuronProperties* np, unsigned int oNeurons){    if( X==0 || Y==0 || Z==0) throw runtime_error("No cube defined yet. Call MakeCube before attempting to create Output");    TFactory * lsmOutput = dynamic_cast<TFactory*> (Factory::GetRegistry().GetFactory("LSMTopology::Output"));    if(!lsmOutput) throw runtime_error("No LSMTopology::Output factory registered");    Output* out = dynamic_cast<Output*> (lsmOutput->MakeTopology("LSM Output"));    output.push_back(out);        // Move the code that used to be in Output::MakeReadout() to here since more than one Output    // object is now allowed.  Since we have to keep track of where neurons have been added    // previously, it will be easier to do that here.    //out->MakeReadout(nType, X, Y, oNeurons);    LOGGER(3, "Making Outputs");    unsigned int neuronCounter = 1;    /*NFactory * nf =  dynamic_cast<NFactory*> (Factory::GetRegistry().GetFactory(nType));    if (nf == NULL) throw runtime_error("No neuron type " + nType + " registered!");*/    //NeuronProperties * nProps = nf->MakeNeuronProperties(true);    PhysicalProperties * pProps = np->GetPhysicalProps();    // distribute the OutputNeurons alongside at the Y-Z side of the cube starting at X+1, 0, 0    for (int z=lastOutZ; true; z++){        for (int y = lastOutY; y < Y; y++){            pProps->SetPosition(X + 1, y, z);            Neuron * n = nf->MakeNeuron(Network::GetNetworkRef()->GetNewNeuronId(), np, out);            OutputManager::AddNeuronToGroup(n, OUTPUTGROUP);            LOGGER(4, "Output neuron at " << X+1 << ", " << y << ", " << z);            lastOutY++;            if(++neuronCounter > oNeurons) return out;        }        lastOutY=0;        lastOutZ++;    }        return out;}void LSMTopology::MakeCube(const string & nType, unsigned int lx, unsigned int ly, unsigned int lz){    X=lx; Y=ly; Z=lz;    LOGGER(1, "Making Cube of size " << X << ", " << Y << ", " << Z);        NFactory * nf =  dynamic_cast<NFactory*> (Factory::GetRegistry().GetFactory(nType));    if (nf == NULL) throw runtime_error("No neuron type " + nType + " registered!");        NeuronProperties * nProps = nf->MakeNeuronProperties(true);    PhysicalProperties * pProps = nProps->GetPhysicalProps();        for (int x = 0; x < X; x++){

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人小视频在线观看| 午夜视频久久久久久| 国产精品性做久久久久久| 欧美成人福利视频| 国产精品一区二区无线| 中文字幕乱码亚洲精品一区| 国产成a人无v码亚洲福利| 国产日韩欧美激情| 99久久精品国产一区| 一区二区免费看| 在线观看日韩精品| 日韩国产在线观看| 久久婷婷色综合| 成人不卡免费av| 一区二区三区欧美视频| 欧美一区二区三区在线观看视频| 麻豆成人久久精品二区三区红 | 欧美一区二区三区在线视频| 狂野欧美性猛交blacked| 国产精品理伦片| 欧美日韩卡一卡二| 国产精品77777| 亚洲欧美日韩中文播放| 欧美一区二区播放| 福利91精品一区二区三区| 亚洲一二三级电影| 精品成人一区二区三区四区| 91麻豆高清视频| 三级在线观看一区二区| 中文字幕精品—区二区四季| 欧美日韩国产经典色站一区二区三区| 麻豆视频一区二区| 亚洲女性喷水在线观看一区| 日韩精品专区在线| 91成人在线精品| 九九精品一区二区| 一区二区三区四区蜜桃| www亚洲一区| 欧美嫩在线观看| 91一区二区三区在线观看| 麻豆国产欧美日韩综合精品二区| 综合激情成人伊人| 精品91自产拍在线观看一区| 91麻豆.com| 国产福利一区二区三区在线视频| 偷拍亚洲欧洲综合| 亚洲女同一区二区| 国产清纯白嫩初高生在线观看91| 制服视频三区第一页精品| 97国产一区二区| 国产九色精品成人porny| 天涯成人国产亚洲精品一区av| 日本一区二区视频在线| 欧美大片在线观看一区二区| 欧美私人免费视频| 99视频精品全部免费在线| 久久精品国产精品亚洲红杏| 午夜电影网一区| 亚洲理论在线观看| 国产精品久久久久影院亚瑟| 精品电影一区二区三区| 在线不卡a资源高清| 色久优优欧美色久优优| 成人av网站在线| 成人一区二区三区视频| 老司机精品视频在线| 日韩电影在线观看电影| 天堂成人国产精品一区| 亚洲国产日韩综合久久精品| 亚洲欧美日韩电影| 亚洲男同1069视频| 伊人性伊人情综合网| 18成人在线视频| 亚洲免费大片在线观看| 日韩美女精品在线| 亚洲免费在线播放| 一区二区视频在线看| 一级中文字幕一区二区| 亚洲综合区在线| 亚洲一区二区三区四区在线| 一区二区三区久久| 亚洲一区日韩精品中文字幕| 一区二区三区四区在线| 亚洲国产精品影院| 亚洲人亚洲人成电影网站色| 自拍偷拍国产亚洲| 一区二区三区四区激情| 天天综合色天天综合| 日韩高清电影一区| 久久国产免费看| 国产成人午夜视频| 91在线码无精品| 欧美剧情片在线观看| 日韩一区二区三区免费观看| 久久日一线二线三线suv| 国产亚洲1区2区3区| 国产精品免费aⅴ片在线观看| 18欧美乱大交hd1984| 亚洲一区在线视频观看| 免费成人性网站| 国产精品99久| 在线欧美小视频| 日韩视频免费直播| 国产色91在线| 亚洲一区二区影院| 久久超碰97中文字幕| 成人夜色视频网站在线观看| 色综合久久精品| 欧美一区二区精品在线| 国产欧美日韩精品一区| 夜夜操天天操亚洲| 精品制服美女久久| 99久精品国产| 日韩女优视频免费观看| 亚洲国产岛国毛片在线| 午夜精品久久久久影视| 国产精品中文字幕欧美| 在线观看www91| 久久嫩草精品久久久久| 亚洲综合一区二区三区| 国产一区二区影院| 欧美午夜不卡视频| 国产午夜精品久久久久久免费视 | 亚洲丝袜美腿综合| 男女性色大片免费观看一区二区| 福利电影一区二区三区| 337p亚洲精品色噜噜噜| 综合在线观看色| 国内成人精品2018免费看| 欧美综合在线视频| 国产日产欧美一区二区三区| 午夜久久久久久久久| 99在线精品一区二区三区| 日韩精品一区二区三区视频在线观看| 亚洲欧美国产77777| 国产在线精品一区二区不卡了 | 亚洲精品中文字幕乱码三区| 麻豆精品在线观看| 欧美亚洲综合网| 国产精品大尺度| 久久精品国产亚洲高清剧情介绍 | 国产真实乱对白精彩久久| 欧美视频自拍偷拍| 国产精品免费aⅴ片在线观看| 久久精品国产一区二区三| 欧美日韩在线免费视频| 亚洲欧洲一区二区在线播放| 韩国精品在线观看| 日韩欧美国产综合一区| 香蕉加勒比综合久久| 色94色欧美sute亚洲线路一久| 欧美经典一区二区| 美女视频黄久久| 91精品国产全国免费观看| 亚洲影院免费观看| 91福利在线导航| 亚洲视频网在线直播| 福利视频网站一区二区三区| 久久蜜桃一区二区| 国产呦萝稀缺另类资源| 日韩精品最新网址| 九色porny丨国产精品| 91精品国产入口在线| 免费人成黄页网站在线一区二区| 欧美日韩免费高清一区色橹橹| 亚洲综合色自拍一区| 欧美色综合影院| 天天操天天综合网| 日韩一区二区电影| 久久精品国产亚洲高清剧情介绍| 欧美一区二区三区免费在线看 | 国产尤物一区二区在线| 精品久久久久久久久久久久久久久久久| 偷拍与自拍一区| 日韩欧美一二三| 国产一区二区在线看| 欧美国产日韩精品免费观看| 不卡一区二区在线| 亚洲欧美日韩国产另类专区| 在线观看免费亚洲| 日韩高清不卡一区二区| 日韩一区二区免费在线电影| 国内精品免费在线观看| 中文字幕va一区二区三区| 99久久久精品| 亚洲国产精品久久人人爱 | 欧美成人在线直播| 国产乱子轮精品视频| 国产精品天美传媒沈樵| 99久久国产免费看| 亚洲国产精品久久人人爱| 日韩欧美一二三四区| 成人小视频在线观看| 亚洲一区二区av电影| 日韩欧美一二三四区| jvid福利写真一区二区三区| 亚洲综合色丁香婷婷六月图片| 日韩一级大片在线观看| 成人在线一区二区三区| 亚洲成人免费影院|