2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 13:33:13 +00:00
This commit is contained in:
2023-01-28 15:33:49 +03:00
parent 01d53ea67c
commit 9e620a98ca
8 changed files with 347 additions and 0 deletions

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Esiur.Analysis.Neural
{
internal class Neuron
{
public double Value { get; set; }
public NeuralLayer Layer { get; set; }
public List<Synapse> Synapses { get; set; } = new List<Synapse>();
public void Forward()
{
var sum = Synapses.Sum(x => x.Weight * x.Source.Value);
Value = Layer.Activation.Function(sum + Layer.PreviousLayer?.Bias ?? 0);
}
}
}