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
|
#if UNITY_MATHEMATICS
|
||||||
|
|
||||||
|
private readonly List<Action> fs = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The output value of the neuron
|
/// The output value of the neuron
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -183,7 +185,11 @@ namespace NanoBrain {
|
|||||||
/// The output value of the neuron
|
/// The output value of the neuron
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual float3 outputValue {
|
public virtual float3 outputValue {
|
||||||
get { return _outputValue; }
|
get {
|
||||||
|
foreach (var f in fs)
|
||||||
|
f();
|
||||||
|
return _outputValue;
|
||||||
|
}
|
||||||
set {
|
set {
|
||||||
_outputValue = value;
|
_outputValue = value;
|
||||||
if (this.isFiring)
|
if (this.isFiring)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user