matnets 3.2.3__tar.gz → 3.2.5__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: matnets
3
- Version: 3.2.3
3
+ Version: 3.2.5
4
4
  Summary: A small experimental neural network library where neurons are represented as matrices.
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [project]
6
6
  name = "matnets"
7
- version = "3.2.3"
7
+ version = "3.2.5"
8
8
  description = "A small experimental neural network library where neurons are represented as matrices."
9
9
  readme = "docs/index.md"
10
10
  requires-python = ">=3.11"
@@ -49,12 +49,12 @@ def sst(x: jax.Array) -> jax.Array:
49
49
  """Scaled squared tanh activation.
50
50
 
51
51
  Applies element-wise tanh, squares the resulting matrices, and
52
- scales them by n^-2 where n is the matrix dimension.
52
+ scales them by n^-1 where n is the matrix dimension.
53
53
  """
54
54
  n = x.shape[-1]
55
55
  t = jnp.tanh(x)
56
56
  s = jnp.matmul(t, t)
57
- scale = float(n) ** -2
57
+ scale = float(n) ** -1
58
58
  return s * scale
59
59
 
60
60
 
@@ -62,10 +62,10 @@ def sss(x: jax.Array) -> jax.Array:
62
62
  """Scaled squared sigmoid activation.
63
63
 
64
64
  Applies element-wise sigmoid, squares the resulting matrices, and
65
- scales them by n^-2 where n is the matrix dimension.
65
+ scales them by n^-1 where n is the matrix dimension.
66
66
  """
67
67
  n = x.shape[-1]
68
68
  t = jnn.sigmoid(x)
69
69
  s = jnp.matmul(t, t)
70
- scale = float(n) ** -2
70
+ scale = float(n) ** -1
71
71
  return s * scale
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes