vincentiusyoshuac commited on
Commit
c94bd82
·
verified ·
1 Parent(s): 7446568

Update memory.py

Browse files
Files changed (1) hide show
  1. memory.py +3 -3
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(1, 64) # Changed from context_size to 1
21
- self.value_proj = nn.Linear(1, 64) # Changed from context_size to 1
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