titans-pytorch 0.3.8__tar.gz → 0.3.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: titans-pytorch
3
- Version: 0.3.8
3
+ Version: 0.3.9
4
4
  Summary: Titans
5
5
  Project-URL: Homepage, https://pypi.org/project/titans-pytorch/
6
6
  Project-URL: Repository, https://github.com/lucidrains/titans-pytorch
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "titans-pytorch"
3
- version = "0.3.8"
3
+ version = "0.3.9"
4
4
  description = "Titans"
5
5
  authors = [
6
6
  { name = "Phil Wang", email = "lucidrains@gmail.com" }
@@ -82,6 +82,7 @@ def test_swiglu_ff_memory():
82
82
  mem = NeuralMemory(
83
83
  dim = 16,
84
84
  chunk_size = 2,
85
+ mem_model_norm_add_residual = False,
85
86
  model = MemorySwiGluMLP(
86
87
  dim = 16,
87
88
  depth = 2
@@ -184,6 +184,7 @@ class MemorySwiGluMLP(Module):
184
184
  ]))
185
185
 
186
186
  self.weights = ParameterList(weights)
187
+ self.norm = LayerNorm(dim)
187
188
 
188
189
  def forward(self, x):
189
190
 
@@ -198,7 +199,7 @@ class MemorySwiGluMLP(Module):
198
199
 
199
200
  x = x + residual
200
201
 
201
- return x
202
+ return self.norm(x)
202
203
 
203
204
  # improvised attention as memory module
204
205
 
File without changes
File without changes
File without changes
File without changes