hyper-connections 0.3.0__py3-none-any.whl → 0.3.2__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.
@@ -6,3 +6,13 @@ from hyper_connections.hyper_connections import (
6
6
  StreamEmbed,
7
7
  AttentionPoolReduceStream
8
8
  )
9
+
10
+ # export with mc prefix, as well as mHC
11
+
12
+ from hyper_connections.manifold_constrained_hyper_connections import (
13
+ ManifoldConstrainedHyperConnections,
14
+ get_expand_reduce_stream_functions as mc_get_expand_reduce_stream_functions,
15
+ get_init_and_expand_reduce_stream_functions as mc_get_init_and_expand_reduce_stream_functions
16
+ )
17
+
18
+ mHC = ManifoldConstrainedHyperConnections
@@ -54,6 +54,8 @@ def l1norm(t, dim):
54
54
  return F.normalize(t, p = 1, dim = dim)
55
55
 
56
56
  def sinkhorn_knopps(log_alpha, iters = 20):
57
+ log_alpha = log_alpha - log_alpha.amax(dim = -2, keepdim = True)
58
+
57
59
  alpha = log_alpha.exp()
58
60
 
59
61
  for _ in range(iters):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyper-connections
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Hyper-Connections
5
5
  Project-URL: Homepage, https://pypi.org/project/hyper-connections/
6
6
  Project-URL: Repository, https://github.com/lucidrains/hyper-connections
@@ -1,11 +1,11 @@
1
- hyper_connections/__init__.py,sha256=d2zNTka0Gp9vINu4U-RhgTJFBhsVrs1fne_15Zl0oOs,224
1
+ hyper_connections/__init__.py,sha256=BAGwi53ozXcnfPJAGur0RHA4vcolF1ORBhbZ9a8SkrE,602
2
2
  hyper_connections/hyper_connections.py,sha256=UHxZhyRwx89GRgmQVt53Gv6JeNhX8UCjjETlydMZjTk,15021
3
3
  hyper_connections/hyper_connections_channel_first.py,sha256=_1PM4LRcPpDqfCiHlBMc2nLV08sXM2nuyZGSKTiuqbE,6818
4
4
  hyper_connections/hyper_connections_with_multi_branch_inputs.py,sha256=6BXKdSwyx6wdQVseebKG2EQkhVaVLrrepOlL8lLnex4,7855
5
5
  hyper_connections/hyper_connections_with_multi_input_streams.py,sha256=ueT3CJPHrt5hRU7q1bFF0rANWJh_pXqclt6HiUu1gBY,11331
6
- hyper_connections/manifold_constrained_hyper_connections.py,sha256=8SgHjk5t0Ze-ydPq-SzrTnP9XfbR-9oX_epXQC7_zlI,16815
6
+ hyper_connections/manifold_constrained_hyper_connections.py,sha256=lizf3wx6eylmkfTtWYDNpb9TYh3qUh3OEEsxK9E7LmI,16885
7
7
  hyper_connections/residuals.py,sha256=JVSFJj_H7xQ3_Fd-pZH5Hdv9SveAQu29jQNvMyom5ek,921
8
- hyper_connections-0.3.0.dist-info/METADATA,sha256=pIK2CVw2twKbwtwWzFL-Qrc5dOTpWz3BtTj1rGJVsx8,6575
9
- hyper_connections-0.3.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
10
- hyper_connections-0.3.0.dist-info/licenses/LICENSE,sha256=E7RGS7kpJIStk5za_-4DVhWEAamf65EU0CNML25mq4c,1066
11
- hyper_connections-0.3.0.dist-info/RECORD,,
8
+ hyper_connections-0.3.2.dist-info/METADATA,sha256=6VC8tvaW4yCRIOAqwFY3i1Pn65GRTCs3Rb1G2CuUusk,6575
9
+ hyper_connections-0.3.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
10
+ hyper_connections-0.3.2.dist-info/licenses/LICENSE,sha256=E7RGS7kpJIStk5za_-4DVhWEAamf65EU0CNML25mq4c,1066
11
+ hyper_connections-0.3.2.dist-info/RECORD,,