hyper-connections 0.4.5__tar.gz → 0.4.6__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.
Files changed (19) hide show
  1. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/PKG-INFO +1 -1
  2. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/hyper_connections/mHCv2.py +8 -0
  3. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/pyproject.toml +1 -1
  4. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/.github/workflows/python-publish.yml +0 -0
  5. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/.github/workflows/test.yml +0 -0
  6. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/.gitignore +0 -0
  7. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/LICENSE +0 -0
  8. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/README.md +0 -0
  9. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/hyper-connections.png +0 -0
  10. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/hyper_connections/__init__.py +0 -0
  11. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/hyper_connections/hyper_connections.py +0 -0
  12. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/hyper_connections/hyper_connections_channel_first.py +0 -0
  13. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/hyper_connections/hyper_connections_with_multi_branch_inputs.py +0 -0
  14. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/hyper_connections/hyper_connections_with_multi_input_streams.py +0 -0
  15. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/hyper_connections/manifold_constrained_hyper_connections.py +0 -0
  16. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/hyper_connections/residuals.py +0 -0
  17. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/hyper_connections/triton_sinkhorn.py +0 -0
  18. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/hyper_connections/vit.py +0 -0
  19. {hyper_connections-0.4.5 → hyper_connections-0.4.6}/tests/test_hyper_connections.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyper-connections
3
- Version: 0.4.5
3
+ Version: 0.4.6
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
@@ -47,6 +47,10 @@ def l1norm(t, dim):
47
47
  return F.normalize(t, p = 1, dim = dim)
48
48
 
49
49
  def sinkhorn_knopps(log_alpha, iters = 20):
50
+
51
+ if iters <= 0:
52
+ return log_alpha
53
+
50
54
  assert log_alpha.shape[-2] == log_alpha.shape[-1]
51
55
 
52
56
  dtype = log_alpha.dtype
@@ -63,6 +67,10 @@ def sinkhorn_knopps(log_alpha, iters = 20):
63
67
  return alpha.to(dtype)
64
68
 
65
69
  def log_domain_sinkhorn_knopps(log_alpha, iters = 20):
70
+
71
+ if iters <= 0:
72
+ return log_alpha
73
+
66
74
  assert log_alpha.shape[-2] == log_alpha.shape[-1]
67
75
 
68
76
  dtype = log_alpha.dtype
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "hyper-connections"
3
- version = "0.4.5"
3
+ version = "0.4.6"
4
4
  description = "Hyper-Connections"
5
5
  authors = [
6
6
  { name = "Phil Wang", email = "lucidrains@gmail.com" }