Skip to content

Commit

Permalink
添加层级
Browse files Browse the repository at this point in the history
  • Loading branch information
lindexi committed Jul 23, 2023
1 parent 3032eef commit 803f4df
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Bp/WherewurjeahodairhohemConanaqe.Wpf/Core/Neuron.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public Neuron(NeuronId id)
}

public NeuronId Id { get; }
public NeuronLayerIndex LayerIndex { get; private set; } = new NeuronLayerIndex(0);

public InputManager InputManager { get; } = new InputManager();
public OutputArgument OutputArgument { get; private set; }

Expand All @@ -45,6 +47,7 @@ public Neuron(NeuronId id)
/// </summary>
public virtual void Run()
{
// 实现最简单的方式,可以替换为不同的方式
using var input = InputManager.GetInput();
var inputList = input.AsSpan();

Expand Down Expand Up @@ -125,4 +128,10 @@ public readonly record struct InputArgument(double Value)

public readonly record struct OutputArgument(double Value);

public readonly record struct NeuronId(ulong Value);
public readonly record struct NeuronId(ulong Value);

/// <summary>
/// 表示多少层
/// </summary>
/// <param name="Value"></param>
public readonly record struct NeuronLayerIndex(ulong Value);

0 comments on commit 803f4df

Please sign in to comment.