titans-pytorch 0.4.11__py3-none-any.whl → 0.4.12__py3-none-any.whl

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.
@@ -161,7 +161,8 @@ def newtonschulz5(
161
161
  eps = 1e-7,
162
162
  coefs = (3.4445, -4.7750, 2.0315)
163
163
  ):
164
- t, inv_pack = pack_one_with_inverse(t, '* i j')
164
+ if t.ndim <= 3:
165
+ return t
165
166
 
166
167
  shape = t.shape
167
168
  should_transpose = shape[-2] > shape[-1]
@@ -169,6 +170,7 @@ def newtonschulz5(
169
170
  if should_transpose:
170
171
  t = t.transpose(-1, -2)
171
172
 
173
+ t, inv_pack = pack_one_with_inverse(t, '* i j')
172
174
  t = t / t.norm(dim = (-1, -2), keepdim = True).clamp(min = eps)
173
175
 
174
176
  a, b, c = coefs
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: titans-pytorch
3
- Version: 0.4.11
3
+ Version: 0.4.12
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
@@ -0,0 +1,8 @@
1
+ titans_pytorch/__init__.py,sha256=sVTOuRUkaIYabFExdLY6s1qXm1UwHHz_J19H8ZV-X74,338
2
+ titans_pytorch/mac_transformer.py,sha256=tz72141G5t3AOnxSVsOLtLptGtl8T7zROUvaTw2_XCY,26960
3
+ titans_pytorch/memory_models.py,sha256=wnH9i9kUSoVZhEWUlj8LpBSbB400L9kLt1zP8CO45QQ,5835
4
+ titans_pytorch/neural_memory.py,sha256=ks9o506pEw88x8D4bYgGUKFA0yMtR4MXfg_XOxMQZCo,34459
5
+ titans_pytorch-0.4.12.dist-info/METADATA,sha256=pDUeGee44iUXzqs9-uHoQWRQxnnMfuPAv8sg2ZO3OT8,7874
6
+ titans_pytorch-0.4.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ titans_pytorch-0.4.12.dist-info/licenses/LICENSE,sha256=1yCiA9b5nhslTavxPjsQAO-wpOnwJR9-l8LTVi7GJuk,1066
8
+ titans_pytorch-0.4.12.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- titans_pytorch/__init__.py,sha256=sVTOuRUkaIYabFExdLY6s1qXm1UwHHz_J19H8ZV-X74,338
2
- titans_pytorch/mac_transformer.py,sha256=tz72141G5t3AOnxSVsOLtLptGtl8T7zROUvaTw2_XCY,26960
3
- titans_pytorch/memory_models.py,sha256=wnH9i9kUSoVZhEWUlj8LpBSbB400L9kLt1zP8CO45QQ,5835
4
- titans_pytorch/neural_memory.py,sha256=SfgU5eSawPLybtja0dDfiqwuSxrXIfWEKpv6eLwU_TY,34422
5
- titans_pytorch-0.4.11.dist-info/METADATA,sha256=-R61GN2toL2KRQi_lS03rfJYg5A7tSVW1raR41ffQEA,7874
6
- titans_pytorch-0.4.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
- titans_pytorch-0.4.11.dist-info/licenses/LICENSE,sha256=1yCiA9b5nhslTavxPjsQAO-wpOnwJR9-l8LTVi7GJuk,1066
8
- titans_pytorch-0.4.11.dist-info/RECORD,,