Skip to content

Commit 1abbd5c

Browse files
author
Lukas Molzberger
committed
AsymmetricSuppression Test
1 parent 6a7dd10 commit 1abbd5c

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
package network.aika.network;
2+
3+
import network.aika.Document;
4+
import network.aika.Model;
5+
import network.aika.neuron.INeuron;
6+
import network.aika.neuron.Neuron;
7+
import network.aika.neuron.Synapse;
8+
import network.aika.neuron.range.Range;
9+
import org.junit.Assert;
10+
import org.junit.Ignore;
11+
import org.junit.Test;
12+
13+
public class AsymmetricSuppression {
14+
15+
16+
@Ignore
17+
@Test
18+
public void testAsymmetricSuppression() {
19+
Model m = new Model();
20+
21+
Neuron inA = m.createNeuron("A");
22+
23+
Neuron inB = m.createNeuron("B");
24+
25+
Neuron outN = Neuron.init(m.createNeuron("OUT"),
26+
0.0,
27+
INeuron.Type.EXCITATORY,
28+
new Synapse.Builder()
29+
.setSynapseId(0)
30+
.setNeuron(inA)
31+
.setWeight(10.0)
32+
.setBias(0.0)
33+
.setRecurrent(false)
34+
.setRangeOutput(Range.Output.DIRECT),
35+
new Synapse.Builder()
36+
.setSynapseId(1)
37+
.setNeuron(inB)
38+
.setWeight(-100.0)
39+
.setBias(0.0)
40+
.setRecurrent(true)
41+
.setRangeOutput(Range.Output.DIRECT)
42+
);
43+
44+
Document doc = m.createDocument("a");
45+
46+
inA.addInput(doc, 0, 1);
47+
inB.addInput(doc, 0, 1);
48+
49+
doc.process();
50+
51+
System.out.println(doc.activationsToString(true, false, true));
52+
53+
Assert.assertTrue(outN.getActivations(doc, true).isEmpty());
54+
55+
doc.clearActivations();
56+
}
57+
}

0 commit comments

Comments
 (0)