📄 feedforwardlayer.h
字号:
/*************************************************************************** feedforwardlayer.h - description ------------------- copyright : (C) 2005 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. * * * ***************************************************************************/#ifndef FEEDFORWARDLAYER_H#define FEEDFORWARDLAYER_H#include <amygdala/topology.h>#include <amygdala/factory.h>#include <string>namespace Amygdala {class SynapseProperties;class NConncetor;/** @class FeedForwardLayer feedforwardlayer.h amygdala/feedforwardlayer.h * @brief Topology with convenience functions to build feedforward connections * * FeedForwardLayer is a topology that is meant to be used in layered networks * in which all of the neurons of one layer will form connections to one or more * layers elsewhere in the network. * @author Matt Grover <mgrover@amygdala.org> * @see Topology */class FeedForwardLayer: public Topology {public: typedef TopologyFactory<FeedForwardLayer> Factory; virtual ~FeedForwardLayer() {} /** Form random connections to another FeedForwardLayer with weights evenly distributed * between a maximum and minimum value. Note that this will form connections with StaticSynapses only. * @param outLayer The output Topology * @param nc The connector used to connect the synapses * @param sProps The synapses properties of the connections * @param percentConnect The percentage of neurons in this layer that should form connections to outLayer */ void ConnectUniform(Topology * outLayer, NConnector & nc, SynapseProperties & sProps, const float percentConnect = 100);/* /** Form random connections to another FeedForwardLayer with weights distributed according to a random * Gaussian distribution. Note that this will form connections with StaticSynapses only. * @param outLayer The output FeedForwardLayer * @param percentConnect The percentage of neurons in this layer that should form connections to outLayer * @param meanWeight The mean weight (absolute value) for the Gaussian distribution * @param stdDev The standard deviation used by the Gaussian * @param delay The synaptic delay between the layers void ConnectGaussian(FeedForwardLayer* outLayer, float percentConnect, float meanWeight, float stdDev, float delay);*/protected: FeedForwardLayer(std::string& name):Topology(name) {}; /** Do any class-specific initialization after one of the MakeNeuron() functions has been called. */ virtual void InitNewNeuron(Neuron* nrn);private: friend class Network; template<class topology> friend class TopologyFactory;};namespace Factory { static FeedForwardLayer::Factory MakeFeedForwardLayer;}} // namespace Amygdala#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -