Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Commit

Permalink
Redesign (final phase)
Browse files Browse the repository at this point in the history
  • Loading branch information
okozelsk committed Sep 2, 2019
1 parent 0aa1b55 commit 3ba20cc
Show file tree
Hide file tree
Showing 16 changed files with 611 additions and 1,312 deletions.
1,349 changes: 318 additions & 1,031 deletions Demo/DemoConsoleApp/DemoSettings.xml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Demo/DemoConsoleApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ static void Main(string[] args)
{
//Research - this is not a part of the demo - it is a free playground
//(new Research()).Run();
SMDemo.RunDemo(new ConsoleLog(), @"DemoSettings.xml");
//Standard execution of the Demo
try
{
Expand Down
10 changes: 10 additions & 0 deletions Demo/DemoConsoleApp/Research.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ public Research()
public void Run()
{
//Activation tests
double fadingSum = 0;
for(int i = 0; i < 1000; i++)
{
fadingSum *= (1d - 0.1);
fadingSum += 1d;
Console.WriteLine(fadingSum);
}

Console.ReadLine();


IActivationFunction testAF = ActivationFactory.Create(new SimpleIFSettings(refractoryPeriods:0), new Random(0));
TestActivation(testAF, 100, 3.5, 10, 70);
Expand Down
18 changes: 8 additions & 10 deletions RCNet/Neural/Network/FF/FeedForwardNetwork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,8 @@ public Layer(int numOfNeurons, IActivationFunction activation)
{
throw new ArgumentOutOfRangeException("numOfNeurons", $"Invalid parameter value: {numOfNeurons}");
}
if (activation == null)
{
throw new ArgumentException("activation", "Activation can't be null");
}
//Setup
Activation = activation;
Activation = activation ?? throw new ArgumentException("activation", "Activation can't be null");
NumOfLayerNeurons = numOfNeurons;
NumOfInputNodes = -1;
WeightsStartFlatIdx = 0;
Expand Down Expand Up @@ -430,11 +426,13 @@ internal void FinalizeStructure(int numOfInputNodes, int neuronsFlatStartIdx, in
/// </summary>
internal Layer DeepClone()
{
Layer clone = new Layer(NumOfLayerNeurons, Activation);
clone.NumOfInputNodes = NumOfInputNodes;
clone.WeightsStartFlatIdx = WeightsStartFlatIdx;
clone.BiasesStartFlatIdx = BiasesStartFlatIdx;
clone.NeuronsStartFlatIdx = NeuronsStartFlatIdx;
Layer clone = new Layer(NumOfLayerNeurons, Activation)
{
NumOfInputNodes = NumOfInputNodes,
WeightsStartFlatIdx = WeightsStartFlatIdx,
BiasesStartFlatIdx = BiasesStartFlatIdx,
NeuronsStartFlatIdx = NeuronsStartFlatIdx
};
return clone;
}

Expand Down
168 changes: 0 additions & 168 deletions RCNet/Neural/Network/SM/Neuron/FiringRate.cs

This file was deleted.

Loading

0 comments on commit 3ba20cc

Please sign in to comment.