ocean::NeuronGroup
大约 3 分钟
ocean::NeuronGroup
神经元组是神经元的基础容器, 容纳了一群性质相近的神经元 More...
#include <Model.hpp>
Inherits from ocean::Model, ocean::Node, std::enable_shared_from_this< Node >
Public Functions
| Name | |
|---|---|
| NeuronGroup(const PNeuronModel & neuronModel) 构造神经元组 | |
| uint16_t | getNumber() 获取神经元组的神经元数量 |
| PNeuronModel | getNeuronModel() 获取内部神经元模型指针 |
Additional inherited members
Public Functions inherited from ocean::Model
| Name | |
|---|---|
| Model(const PIModel & base) 构造模型, 该方法由模块内部调用 | |
| ~Model() override 模型析构 | |
| float | getStep() 获取计算步长,步长是两次计算间的周期 |
| std::string | getOperation() 获取操作名称 |
| PVariable | getParam(const std::string & paramName) 根据参数名称获取变量 |
| PTensorVariable | getStatus(const std::string & variableName) 据参数名称张量变量 |
| bool | setStatus(const std::string & variableName, const Filler & filler) 根据参数名称设置张量变量 |
| bool | setStatus(const std::string & variableName, const Tensor & status) 根据参数名称设置张量变量 |
| PInput | in(const std::string & name) 根据端口名称获取输入端口 |
| POutput | out(const std::string & name) 根据端口名称获取输出端口 |
| PReference | ref(const std::string & name) 根据端口名称获取引用端口 |
| PConnection | mat(const std::string & name) 根据端口名称获取连接端口 |
| void | addMonitor(const std::string & paramName, float windows =0) 添加变量监控 |
| void | addMonitors(std::vector< std::string > monitors, float windows =0) 批量添加变量监控 |
| void | removeMonitor(const std::string & paramName) 移除变量监控 |
| void | removeMonitors(std::vector< std::string > monitors) 批量删除变量监控 |
| CaptureBuffer | getCapture(const std::string & paramName) 获取变量监控结果 |
| std::vector< CaptureBuffer > | getCaptures(std::vector< std::string > captures) 批量获取变量监控 |
| PIModel | getModel() 获取内部模型指针, 仅被内部模块使用 |
Public Functions inherited from ocean::Node
| Name | |
|---|---|
| Node(PModelBase model) 构造节点 | |
| virtual | ~Node() 节点析构函数 |
| const std::string & | getName() const 获取节点名称 |
| const std::string & | getDescription() const 获取节点描述 |
| void | setDescription(const std::string & description) 设置节点描述 |
| PModelBase | getModelBase() 获取内部基类指针 |
Protected Attributes inherited from ocean::Node
| Name | |
|---|---|
| PModelBase | model 内部模块指针 |
Detailed Description
class ocean::NeuronGroup;
神经元组是神经元的基础容器, 容纳了一群性质相近的神经元
Note: 一组神经元组最大支持65535个神经元
NeuronGroup 继承 Model, 是一种基础模型,管理一群特性相近的神经元; 内部状态可以通过 Model的接口进行查询或设置,具体模型的参数参见操作规格说明
Public Functions Documentation
function NeuronGroup
explicit NeuronGroup(
const PNeuronModel & neuronModel
)
构造神经元组
Parameters:
- neuronModel 神经元组模型实例
Note: 该方法仅由内部模块调用
function getNumber
uint16_t getNumber()
获取神经元组的神经元数量
Return: 神经元数量
Note: 一组神经元组最大支持65535个神经元
function getNeuronModel
PNeuronModel getNeuronModel()
获取内部神经元模型指针
Return: 内部模块指针
Note: 该方法仅由内部模块调用
Updated on 2022-08-19 at 17:14:26 +0800