Simplyfying
This commit is contained in:
parent
d754457a14
commit
b60fc19d96
@ -12,8 +12,8 @@ public class MemoryCell : Neuron {
|
||||
|
||||
// Returns the memorized value weighted by time
|
||||
// return lastValue * (current time - last time)
|
||||
[SerializeField]
|
||||
public bool deltaValue = false;
|
||||
// [SerializeField]
|
||||
// public bool deltaValue = false;
|
||||
|
||||
#endregion Parameters
|
||||
|
||||
@ -46,12 +46,12 @@ public class MemoryCell : Neuron {
|
||||
|
||||
public override void UpdateResult(Vector3 result) {
|
||||
// output value is the previous value
|
||||
if (this.deltaValue) {
|
||||
float deltaTime = Time.time - this._memorizedTime;
|
||||
this._outputValue = this._memorizedValue * deltaTime;
|
||||
}
|
||||
else
|
||||
this._outputValue = this._memorizedValue;
|
||||
// if (this.deltaValue) {
|
||||
// float deltaTime = Time.time - this._memorizedTime;
|
||||
// this._outputValue = this._memorizedValue * deltaTime;
|
||||
// }
|
||||
//else
|
||||
this.outputValue = this._memorizedValue;
|
||||
|
||||
// Store the result for the next time
|
||||
this._memorizedValue = result;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user