titans-pytorch 0.2.23__tar.gz → 0.2.24__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.2.23
3
+ Version: 0.2.24
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.2.23"
3
+ version = "0.2.24"
4
4
  description = "Titans"
5
5
  authors = [
6
6
  { name = "Phil Wang", email = "lucidrains@gmail.com" }
@@ -868,12 +868,11 @@ class NeuralMemory(Module):
868
868
 
869
869
  # update weights once batch size is fulfilled
870
870
 
871
- weights = next_neural_mem_state.weights
872
-
873
871
  last_update, _ = past_state
874
872
 
875
873
  if exists(gate):
876
- weights = TensorDict({param_name: v1.lerp(v2, gate) for (param_name, v1), (_, v2) in zip(weights.items(), last_update.items())})
874
+ curr_weights = next_neural_mem_state.updates.apply(lambda t: t[:, 0])
875
+ weights = TensorDict({param_name: v1.lerp(v2, gate) for (param_name, v1), (_, v2) in zip(curr_weights.items(), last_update.items())})
877
876
  else:
878
877
  weights = last_update
879
878
 
File without changes