internal GatedAddressing(Unit gate, ContentAddressing contentAddressing, HeadSetting oldHeadSettings) { _gate = gate; ContentVector = contentAddressing; _oldHeadSettings = oldHeadSettings; Unit[] contentVector = ContentVector.ContentVector; _memoryCellCount = contentVector.Length; GatedVector = UnitFactory.GetVector(_memoryCellCount); //Implementation of focusing by location - page 8 part 3.3.2. Focusing by Location _gt = Sigmoid.GetValue(_gate.Value); _oneminusgt = (1 - _gt); for (int i = 0; i < _memoryCellCount; i++) { GatedVector[i].Value = (_gt * contentVector[i].Value) + (_oneminusgt * _oldHeadSettings.AddressingVector[i].Value); } }
internal GatedAddressing(Unit gate, ContentAddressing contentAddressing, HeadSetting oldHeadSettings) { _gate = gate; ContentVector = contentAddressing; _oldHeadSettings = oldHeadSettings; Unit[] contentVector = ContentVector.ContentVector; _memoryCellCount = contentVector.Length; GatedVector = UnitFactory.GetVector(_memoryCellCount); //Implementation of focusing by location - page 8 part 3.3.2. Focusing by Location _gt = Sigmoid.GetValue(_gate.Value); _oneminusgt = (1 - _gt); for (int i = 0; i < _memoryCellCount; i++) { GatedVector[i].Value = (_gt * contentVector[i].Value) + (_oneminusgt * _oldHeadSettings.AddressingVector[i].Value); } }