Add function call option when getting output
This commit is contained in:
parent
cde3a0f4d3
commit
abd337f1dd
@ -174,6 +174,8 @@ namespace NanoBrain {
|
||||
|
||||
#if UNITY_MATHEMATICS
|
||||
|
||||
private readonly List<Action> fs = new();
|
||||
|
||||
/// <summary>
|
||||
/// The output value of the neuron
|
||||
/// </summary>
|
||||
@ -183,7 +185,11 @@ namespace NanoBrain {
|
||||
/// The output value of the neuron
|
||||
/// </summary>
|
||||
public virtual float3 outputValue {
|
||||
get { return _outputValue; }
|
||||
get {
|
||||
foreach (var f in fs)
|
||||
f();
|
||||
return _outputValue;
|
||||
}
|
||||
set {
|
||||
_outputValue = value;
|
||||
if (this.isFiring)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user