We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6c62e9 commit ee8ad8eCopy full SHA for ee8ad8e
core/src/main/java/network/aika/elements/activations/Activation.java
@@ -533,7 +533,6 @@ public Activation<N> instantiateTemplateNode() {
533
N n = null;
534
if(doc.getInstantiationCallback() != null) {
535
n = (N) doc.getInstantiationCallback().resolveInstance(neuron, doc);
536
- n.getProvider().increaseRefCount(TEMPLATE);
537
}
538
539
boolean newNeuronInstance = false;
@@ -559,7 +558,8 @@ public Activation<N> instantiateTemplateNode() {
559
558
if(ti != null && ti.getLabel() != null)
560
getModel().registerLabel(ti.getNeuron(), neuron);
561
562
- n.getProvider().decreaseRefCount(TEMPLATE);
+ if(newNeuronInstance)
+ n.getProvider().decreaseRefCount(TEMPLATE);
563
564
return ti;
565
0 commit comments