hyper-connections 0.3.0__tar.gz → 0.3.2__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 (17) hide show
  1. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/PKG-INFO +1 -1
  2. hyper_connections-0.3.2/hyper_connections/__init__.py +18 -0
  3. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/hyper_connections/manifold_constrained_hyper_connections.py +2 -0
  4. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/pyproject.toml +1 -1
  5. hyper_connections-0.3.0/hyper_connections/__init__.py +0 -8
  6. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/.github/workflows/python-publish.yml +0 -0
  7. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/.github/workflows/test.yml +0 -0
  8. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/.gitignore +0 -0
  9. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/LICENSE +0 -0
  10. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/README.md +0 -0
  11. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/hyper-connections.png +0 -0
  12. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/hyper_connections/hyper_connections.py +0 -0
  13. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/hyper_connections/hyper_connections_channel_first.py +0 -0
  14. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/hyper_connections/hyper_connections_with_multi_branch_inputs.py +0 -0
  15. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/hyper_connections/hyper_connections_with_multi_input_streams.py +0 -0
  16. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/hyper_connections/residuals.py +0 -0
  17. {hyper_connections-0.3.0 → hyper_connections-0.3.2}/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.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
@@ -0,0 +1,18 @@
1
+ from hyper_connections.hyper_connections import (
2
+ HyperConnections,
3
+ get_expand_reduce_stream_functions,
4
+ get_init_and_expand_reduce_stream_functions,
5
+ Residual,
6
+ StreamEmbed,
7
+ AttentionPoolReduceStream
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
  [project]
2
2
  name = "hyper-connections"
3
- version = "0.3.0"
3
+ version = "0.3.2"
4
4
  description = "Hyper-Connections"
5
5
  authors = [
6
6
  { name = "Phil Wang", email = "lucidrains@gmail.com" }
@@ -1,8 +0,0 @@
1
- from hyper_connections.hyper_connections import (
2
- HyperConnections,
3
- get_expand_reduce_stream_functions,
4
- get_init_and_expand_reduce_stream_functions,
5
- Residual,
6
- StreamEmbed,
7
- AttentionPoolReduceStream
8
- )