Update memory.py
Browse files
memory.py
CHANGED
@@ -17,9 +17,9 @@ class CognitiveMemory(nn.Module):
|
|
17 |
self.consolidation_threshold = 0.7
|
18 |
|
19 |
# Memory projection layers
|
20 |
-
self.key_proj = nn.Linear(
|
21 |
-
self.value_proj = nn.Linear(
|
22 |
-
|
23 |
def add_memory(self, context: torch.Tensor, activation: float):
|
24 |
"""Store new memory with adaptive importance"""
|
25 |
# Ensure context is 1D tensor with single value
|
|
|
17 |
self.consolidation_threshold = 0.7
|
18 |
|
19 |
# Memory projection layers
|
20 |
+
self.key_proj = nn.Linear(context_size, 64)
|
21 |
+
self.value_proj = nn.Linear(context_size, 64)
|
22 |
+
|
23 |
def add_memory(self, context: torch.Tensor, activation: float):
|
24 |
"""Store new memory with adaptive importance"""
|
25 |
# Ensure context is 1D tensor with single value
|