brainstate 0.1.4__py2.py3-none-any.whl → 0.1.6__py2.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.
- brainstate/__init__.py +1 -1
- brainstate/_state.py +6 -5
- brainstate/augment/_autograd.py +31 -12
- brainstate/augment/_autograd_test.py +46 -46
- brainstate/augment/_eval_shape.py +4 -4
- brainstate/augment/_mapping.py +22 -17
- brainstate/augment/_mapping_test.py +162 -0
- brainstate/compile/_conditions.py +2 -2
- brainstate/compile/_make_jaxpr.py +59 -6
- brainstate/compile/_progress_bar.py +2 -2
- brainstate/environ.py +19 -19
- brainstate/functional/_activations_test.py +12 -12
- brainstate/graph/_graph_operation.py +69 -69
- brainstate/graph/_graph_operation_test.py +2 -2
- brainstate/mixin.py +0 -17
- brainstate/nn/_collective_ops.py +4 -4
- brainstate/nn/_common.py +7 -19
- brainstate/nn/_dropout_test.py +2 -2
- brainstate/nn/_dynamics.py +53 -35
- brainstate/nn/_elementwise.py +30 -30
- brainstate/nn/_exp_euler.py +13 -16
- brainstate/nn/_inputs.py +1 -1
- brainstate/nn/_linear.py +4 -4
- brainstate/nn/_module.py +6 -6
- brainstate/nn/_module_test.py +1 -1
- brainstate/nn/_normalizations.py +11 -11
- brainstate/nn/_normalizations_test.py +6 -6
- brainstate/nn/_poolings.py +24 -24
- brainstate/nn/_synapse.py +1 -12
- brainstate/nn/_utils.py +1 -1
- brainstate/nn/metrics.py +4 -4
- brainstate/optim/_optax_optimizer.py +8 -8
- brainstate/random/_rand_funs.py +37 -37
- brainstate/random/_rand_funs_test.py +3 -3
- brainstate/random/_rand_seed.py +7 -7
- brainstate/random/_rand_state.py +13 -7
- brainstate/surrogate.py +40 -40
- brainstate/util/pretty_pytree.py +10 -10
- brainstate/util/{_pretty_pytree_test.py → pretty_pytree_test.py} +36 -37
- brainstate/util/struct.py +7 -7
- {brainstate-0.1.4.dist-info → brainstate-0.1.6.dist-info}/METADATA +12 -12
- {brainstate-0.1.4.dist-info → brainstate-0.1.6.dist-info}/RECORD +45 -45
- {brainstate-0.1.4.dist-info → brainstate-0.1.6.dist-info}/WHEEL +1 -1
- {brainstate-0.1.4.dist-info → brainstate-0.1.6.dist-info}/LICENSE +0 -0
- {brainstate-0.1.4.dist-info → brainstate-0.1.6.dist-info}/top_level.txt +0 -0
brainstate/util/pretty_pytree.py
CHANGED
@@ -373,19 +373,19 @@ class NestedDict(PrettyDict):
|
|
373
373
|
|
374
374
|
Example usage::
|
375
375
|
|
376
|
-
>>> import brainstate as
|
376
|
+
>>> import brainstate as brainstate
|
377
377
|
|
378
|
-
>>> class Model(
|
378
|
+
>>> class Model(brainstate.nn.Module):
|
379
379
|
... def __init__(self):
|
380
380
|
... super().__init__()
|
381
|
-
... self.batchnorm =
|
382
|
-
... self.linear =
|
381
|
+
... self.batchnorm = brainstate.nn.BatchNorm1d([10, 3])
|
382
|
+
... self.linear = brainstate.nn.Linear(2, 3)
|
383
383
|
... def __call__(self, x):
|
384
384
|
... return self.linear(self.batchnorm(x))
|
385
385
|
|
386
386
|
>>> model = Model()
|
387
|
-
>>> state_map =
|
388
|
-
>>> param, others = state_map.treefy_split(
|
387
|
+
>>> state_map = brainstate.graph.treefy_states(model)
|
388
|
+
>>> param, others = state_map.treefy_split(brainstate.ParamState, ...)
|
389
389
|
|
390
390
|
Arguments:
|
391
391
|
first: The first filter
|
@@ -495,14 +495,14 @@ class FlattedDict(PrettyDict):
|
|
495
495
|
|
496
496
|
Example usage::
|
497
497
|
|
498
|
-
>>> import brainstate as
|
498
|
+
>>> import brainstate as brainstate
|
499
499
|
>>> import jax.numpy as jnp
|
500
500
|
>>>
|
501
|
-
>>> class Model(
|
501
|
+
>>> class Model(brainstate.nn.Module):
|
502
502
|
... def __init__(self):
|
503
503
|
... super().__init__()
|
504
|
-
... self.batchnorm =
|
505
|
-
... self.linear =
|
504
|
+
... self.batchnorm = brainstate.nn.BatchNorm1d([10, 3])
|
505
|
+
... self.linear = brainstate.nn.Linear(2, 3)
|
506
506
|
... def __call__(self, x):
|
507
507
|
... return self.linear(self.batchnorm(x))
|
508
508
|
>>>
|
@@ -13,31 +13,30 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
# ==============================================================================
|
15
15
|
|
16
|
-
from __future__ import annotations
|
17
16
|
|
18
17
|
import unittest
|
19
18
|
|
20
19
|
import jax
|
21
20
|
from absl.testing import absltest
|
22
21
|
|
23
|
-
import brainstate
|
22
|
+
import brainstate
|
24
23
|
|
25
24
|
|
26
25
|
class TestNestedMapping(absltest.TestCase):
|
27
26
|
def test_create_state(self):
|
28
|
-
state =
|
27
|
+
state = brainstate.util.NestedDict({'a': brainstate.ParamState(1), 'b': {'c': brainstate.ParamState(2)}})
|
29
28
|
|
30
29
|
assert state['a'].value == 1
|
31
30
|
assert state['b']['c'].value == 2
|
32
31
|
|
33
32
|
def test_get_attr(self):
|
34
|
-
state =
|
33
|
+
state = brainstate.util.NestedDict({'a': brainstate.ParamState(1), 'b': {'c': brainstate.ParamState(2)}})
|
35
34
|
|
36
35
|
assert state.a.value == 1
|
37
36
|
assert state.b['c'].value == 2
|
38
37
|
|
39
38
|
def test_set_attr(self):
|
40
|
-
state =
|
39
|
+
state = brainstate.util.NestedDict({'a': brainstate.ParamState(1), 'b': {'c': brainstate.ParamState(2)}})
|
41
40
|
|
42
41
|
state.a.value = 3
|
43
42
|
state.b['c'].value = 4
|
@@ -46,36 +45,36 @@ class TestNestedMapping(absltest.TestCase):
|
|
46
45
|
assert state['b']['c'].value == 4
|
47
46
|
|
48
47
|
def test_set_attr_variables(self):
|
49
|
-
state =
|
48
|
+
state = brainstate.util.NestedDict({'a': brainstate.ParamState(1), 'b': {'c': brainstate.ParamState(2)}})
|
50
49
|
|
51
50
|
state.a.value = 3
|
52
51
|
state.b['c'].value = 4
|
53
52
|
|
54
|
-
assert isinstance(state.a,
|
53
|
+
assert isinstance(state.a, brainstate.ParamState)
|
55
54
|
assert state.a.value == 3
|
56
|
-
assert isinstance(state.b['c'],
|
55
|
+
assert isinstance(state.b['c'], brainstate.ParamState)
|
57
56
|
assert state.b['c'].value == 4
|
58
57
|
|
59
58
|
def test_add_nested_attr(self):
|
60
|
-
state =
|
61
|
-
state.b['d'] =
|
59
|
+
state = brainstate.util.NestedDict({'a': brainstate.ParamState(1), 'b': {'c': brainstate.ParamState(2)}})
|
60
|
+
state.b['d'] = brainstate.ParamState(5)
|
62
61
|
|
63
62
|
assert state['b']['d'].value == 5
|
64
63
|
|
65
64
|
def test_delete_nested_attr(self):
|
66
|
-
state =
|
65
|
+
state = brainstate.util.NestedDict({'a': brainstate.ParamState(1), 'b': {'c': brainstate.ParamState(2)}})
|
67
66
|
del state['b']['c']
|
68
67
|
|
69
68
|
assert 'c' not in state['b']
|
70
69
|
|
71
70
|
def test_integer_access(self):
|
72
|
-
class Foo(
|
71
|
+
class Foo(brainstate.nn.Module):
|
73
72
|
def __init__(self):
|
74
73
|
super().__init__()
|
75
|
-
self.layers = [
|
74
|
+
self.layers = [brainstate.nn.Linear(1, 2), brainstate.nn.Linear(2, 3)]
|
76
75
|
|
77
76
|
module = Foo()
|
78
|
-
state_refs =
|
77
|
+
state_refs = brainstate.graph.treefy_states(module)
|
79
78
|
|
80
79
|
assert module.layers[0].weight.value['weight'].shape == (1, 2)
|
81
80
|
assert state_refs.layers[0]['weight'].value['weight'].shape == (1, 2)
|
@@ -83,8 +82,8 @@ class TestNestedMapping(absltest.TestCase):
|
|
83
82
|
assert state_refs.layers[1]['weight'].value['weight'].shape == (2, 3)
|
84
83
|
|
85
84
|
def test_pure_dict(self):
|
86
|
-
module =
|
87
|
-
state_map =
|
85
|
+
module = brainstate.nn.Linear(4, 5)
|
86
|
+
state_map = brainstate.graph.treefy_states(module)
|
88
87
|
pure_dict = state_map.to_pure_dict()
|
89
88
|
assert isinstance(pure_dict, dict)
|
90
89
|
assert isinstance(pure_dict['weight'].value['weight'], jax.Array)
|
@@ -93,27 +92,27 @@ class TestNestedMapping(absltest.TestCase):
|
|
93
92
|
|
94
93
|
class TestSplit(unittest.TestCase):
|
95
94
|
def test_split(self):
|
96
|
-
class Model(
|
95
|
+
class Model(brainstate.nn.Module):
|
97
96
|
def __init__(self):
|
98
97
|
super().__init__()
|
99
|
-
self.batchnorm =
|
100
|
-
self.linear =
|
98
|
+
self.batchnorm = brainstate.nn.BatchNorm1d([10, 3])
|
99
|
+
self.linear = brainstate.nn.Linear([10, 3], [10, 4])
|
101
100
|
|
102
101
|
def __call__(self, x):
|
103
102
|
return self.linear(self.batchnorm(x))
|
104
103
|
|
105
|
-
with
|
104
|
+
with brainstate.environ.context(fit=True):
|
106
105
|
model = Model()
|
107
|
-
x =
|
106
|
+
x = brainstate.random.randn(1, 10, 3)
|
108
107
|
y = model(x)
|
109
108
|
self.assertEqual(y.shape, (1, 10, 4))
|
110
109
|
|
111
|
-
state_map =
|
110
|
+
state_map = brainstate.graph.treefy_states(model)
|
112
111
|
|
113
112
|
with self.assertRaises(ValueError):
|
114
|
-
params, others = state_map.split(
|
113
|
+
params, others = state_map.split(brainstate.ParamState)
|
115
114
|
|
116
|
-
params, others = state_map.split(
|
115
|
+
params, others = state_map.split(brainstate.ParamState, ...)
|
117
116
|
print()
|
118
117
|
print(params)
|
119
118
|
print(others)
|
@@ -124,37 +123,37 @@ class TestSplit(unittest.TestCase):
|
|
124
123
|
|
125
124
|
class TestStateMap2(unittest.TestCase):
|
126
125
|
def test1(self):
|
127
|
-
class Model(
|
126
|
+
class Model(brainstate.nn.Module):
|
128
127
|
def __init__(self):
|
129
128
|
super().__init__()
|
130
|
-
self.batchnorm =
|
131
|
-
self.linear =
|
129
|
+
self.batchnorm = brainstate.nn.BatchNorm1d([10, 3])
|
130
|
+
self.linear = brainstate.nn.Linear([10, 3], [10, 4])
|
132
131
|
|
133
132
|
def __call__(self, x):
|
134
133
|
return self.linear(self.batchnorm(x))
|
135
134
|
|
136
|
-
with
|
135
|
+
with brainstate.environ.context(fit=True):
|
137
136
|
model = Model()
|
138
|
-
state_map =
|
139
|
-
state_map =
|
137
|
+
state_map = brainstate.graph.treefy_states(model).to_flat()
|
138
|
+
state_map = brainstate.util.NestedDict(state_map)
|
140
139
|
|
141
140
|
|
142
141
|
class TestFlattedMapping(unittest.TestCase):
|
143
142
|
def test1(self):
|
144
|
-
class Model(
|
143
|
+
class Model(brainstate.nn.Module):
|
145
144
|
def __init__(self):
|
146
145
|
super().__init__()
|
147
|
-
self.batchnorm =
|
148
|
-
self.linear =
|
146
|
+
self.batchnorm = brainstate.nn.BatchNorm1d([10, 3])
|
147
|
+
self.linear = brainstate.nn.Linear([10, 3], [10, 4])
|
149
148
|
|
150
149
|
def __call__(self, x):
|
151
150
|
return self.linear(self.batchnorm(x))
|
152
151
|
|
153
152
|
model = Model()
|
154
153
|
# print(model.states())
|
155
|
-
# print(
|
156
|
-
self.assertTrue(model.states() ==
|
154
|
+
# print(brainstate.graph.states(model))
|
155
|
+
self.assertTrue(model.states() == brainstate.graph.states(model))
|
157
156
|
|
158
157
|
print(model.nodes())
|
159
|
-
# print(
|
160
|
-
self.assertTrue(model.nodes() ==
|
158
|
+
# print(brainstate.graph.nodes(model))
|
159
|
+
self.assertTrue(model.nodes() == brainstate.graph.nodes(model))
|
brainstate/util/struct.py
CHANGED
@@ -56,16 +56,16 @@ def dataclass(clz: T, **kwargs) -> T:
|
|
56
56
|
The ``dataclass`` decorator makes it easy to define custom classes that can be
|
57
57
|
passed safely to Jax. For example::
|
58
58
|
|
59
|
-
>>> import brainstate as
|
59
|
+
>>> import brainstate as brainstate
|
60
60
|
>>> import jax
|
61
61
|
>>> from typing import Any, Callable
|
62
62
|
|
63
|
-
>>> @
|
63
|
+
>>> @brainstate.util.dataclass
|
64
64
|
... class Model:
|
65
65
|
... params: Any
|
66
66
|
... # use pytree_node=False to indicate an attribute should not be touched
|
67
67
|
... # by Jax transformations.
|
68
|
-
... apply_fn: Callable =
|
68
|
+
... apply_fn: Callable = brainstate.util.field(pytree_node=False)
|
69
69
|
|
70
70
|
... def __apply__(self, *args):
|
71
71
|
... return self.apply_fn(*args)
|
@@ -97,7 +97,7 @@ def dataclass(clz: T, **kwargs) -> T:
|
|
97
97
|
This way the simple constructor used by ``jax.tree_util`` is
|
98
98
|
preserved. Consider the following example::
|
99
99
|
|
100
|
-
>>> @
|
100
|
+
>>> @brainstate.util.dataclass
|
101
101
|
... class DirectionAndScaleKernel:
|
102
102
|
... direction: jax.Array
|
103
103
|
... scale: jax.Array
|
@@ -189,15 +189,15 @@ class PyTreeNode:
|
|
189
189
|
|
190
190
|
Example::
|
191
191
|
|
192
|
-
>>> import brainstate as
|
192
|
+
>>> import brainstate as brainstate
|
193
193
|
>>> import jax
|
194
194
|
>>> from typing import Any, Callable
|
195
195
|
|
196
|
-
>>> class Model(
|
196
|
+
>>> class Model(brainstate.util.PyTreeNode):
|
197
197
|
... params: Any
|
198
198
|
... # use pytree_node=False to indicate an attribute should not be touched
|
199
199
|
... # by Jax transformations.
|
200
|
-
... apply_fn: Callable =
|
200
|
+
... apply_fn: Callable = brainstate.util.field(pytree_node=False)
|
201
201
|
|
202
202
|
... def __apply__(self, *args):
|
203
203
|
... return self.apply_fn(*args)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: brainstate
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.6
|
4
4
|
Summary: A ``State``-based Transformation System for Program Compilation and Augmentation.
|
5
5
|
Home-page: https://github.com/chaobrain/brainstate
|
6
6
|
Author: BrainState Developers
|
@@ -31,22 +31,22 @@ License-File: LICENSE
|
|
31
31
|
Requires-Dist: jax
|
32
32
|
Requires-Dist: jaxlib
|
33
33
|
Requires-Dist: numpy
|
34
|
-
Requires-Dist: brainunit
|
34
|
+
Requires-Dist: brainunit>=0.0.4
|
35
35
|
Requires-Dist: brainevent
|
36
36
|
Provides-Extra: cpu
|
37
|
-
Requires-Dist: jax[cpu]
|
38
|
-
Requires-Dist: brainunit[cpu]
|
39
|
-
Requires-Dist: brainevent[cpu]
|
37
|
+
Requires-Dist: jax[cpu]; extra == "cpu"
|
38
|
+
Requires-Dist: brainunit[cpu]; extra == "cpu"
|
39
|
+
Requires-Dist: brainevent[cpu]; extra == "cpu"
|
40
40
|
Provides-Extra: cuda12
|
41
|
-
Requires-Dist: jax[cuda12]
|
42
|
-
Requires-Dist: brainunit[cuda12]
|
43
|
-
Requires-Dist: brainevent[cuda12]
|
41
|
+
Requires-Dist: jax[cuda12]; extra == "cuda12"
|
42
|
+
Requires-Dist: brainunit[cuda12]; extra == "cuda12"
|
43
|
+
Requires-Dist: brainevent[cuda12]; extra == "cuda12"
|
44
44
|
Provides-Extra: testing
|
45
|
-
Requires-Dist: pytest
|
45
|
+
Requires-Dist: pytest; extra == "testing"
|
46
46
|
Provides-Extra: tpu
|
47
|
-
Requires-Dist: jax[tpu]
|
48
|
-
Requires-Dist: brainunit[tpu]
|
49
|
-
Requires-Dist: brainevent[tpu]
|
47
|
+
Requires-Dist: jax[tpu]; extra == "tpu"
|
48
|
+
Requires-Dist: brainunit[tpu]; extra == "tpu"
|
49
|
+
Requires-Dist: brainevent[tpu]; extra == "tpu"
|
50
50
|
|
51
51
|
|
52
52
|
# A ``State``-based Transformation System for Program Compilation and Augmentation
|
@@ -1,27 +1,27 @@
|
|
1
|
-
brainstate/__init__.py,sha256=
|
1
|
+
brainstate/__init__.py,sha256=jCLuGmUnNNYYpHUGsGZrw--LWrAtO0m1ABtU_1qvtRM,1496
|
2
2
|
brainstate/_compatible_import.py,sha256=LUSZlA0APWozxM8Kf9pZrM2YbwY7X3jzVVHZInaBL7Y,4630
|
3
|
-
brainstate/_state.py,sha256=
|
3
|
+
brainstate/_state.py,sha256=PLzoYx13jIgnzyBxnktLTVPCFl6seG__aNIHS9A5Nms,60770
|
4
4
|
brainstate/_state_test.py,sha256=b6uvZdVRyC4n6-fYzmHNry1b-gJ6zE_kRSxGinqiHaw,1638
|
5
5
|
brainstate/_utils.py,sha256=j-b239RHfC5BnvhGbSExQpdY21LrMEyWMSHBdNGThOI,1657
|
6
|
-
brainstate/environ.py,sha256=
|
6
|
+
brainstate/environ.py,sha256=vxwGyYm4lf9Ym5iD6YHsYy4bTwmeD8yHIuZsqqGfP4s,17793
|
7
7
|
brainstate/environ_test.py,sha256=QD6sPCKNtqemVCGwkdImjMazatrvvLr6YeAVcfUnVVY,2045
|
8
|
-
brainstate/mixin.py,sha256=
|
8
|
+
brainstate/mixin.py,sha256=eOOODmESCYITJbvz6dnQLyu8u2m0YrTaEvZsepdAUto,10991
|
9
9
|
brainstate/mixin_test.py,sha256=Oq_0fwC9vpXDN4t4dTBhWzLdFDNlcYsrcip14F1yECI,3079
|
10
|
-
brainstate/surrogate.py,sha256=
|
10
|
+
brainstate/surrogate.py,sha256=zCNrJG-UMuvH7Le7iBuolDc-Oy8UY-xvw77tNhkGvK8,53861
|
11
11
|
brainstate/transform.py,sha256=OvshYpPnp3YXPG6riy15Ve7jcX8t0aaATl1xZnsFeic,858
|
12
12
|
brainstate/typing.py,sha256=cIlcgaWbvsFyEb5GgwZD7NHJh9qAp8l-N-rYN5W9FsU,10519
|
13
13
|
brainstate/augment/__init__.py,sha256=Q9-JIwQ1FNn8VLS1MA9MrSylbvUjWSw98whrI3NIuKo,1229
|
14
|
-
brainstate/augment/_autograd.py,sha256=
|
15
|
-
brainstate/augment/_autograd_test.py,sha256=
|
16
|
-
brainstate/augment/_eval_shape.py,sha256=
|
14
|
+
brainstate/augment/_autograd.py,sha256=XG0BgWrZ7LPelt2nRBKhpiMqz9jNS8NsK7x_I3DJINs,30884
|
15
|
+
brainstate/augment/_autograd_test.py,sha256=1gR_38_i3pfH4S744G9x4KfGGtlyY0MBt43R_fndd9A,45396
|
16
|
+
brainstate/augment/_eval_shape.py,sha256=jyzFzvZnUkbky7lxuchyFNGn0oJP1u10ZH5p79tAYMI,3868
|
17
17
|
brainstate/augment/_eval_shape_test.py,sha256=WXrmZKmnykmYPveRfZbrDF0sFm2_PTr982yl4JM7Ebg,1390
|
18
|
-
brainstate/augment/_mapping.py,sha256=
|
19
|
-
brainstate/augment/_mapping_test.py,sha256=
|
18
|
+
brainstate/augment/_mapping.py,sha256=R9CYp8JrdWpQcQE-XGr7POXyHqIEAYPxZfWqHF-wc70,43815
|
19
|
+
brainstate/augment/_mapping_test.py,sha256=tEyXioA4_v4WGRFrpgUInyKyBjAVNLonWdHKVacmphU,21946
|
20
20
|
brainstate/augment/_random.py,sha256=bkngsIk6Wwi3e46I7YSbBjLCGAz0Q3WuadUH4mqTjbY,5348
|
21
21
|
brainstate/compile/__init__.py,sha256=fQtG316MLkeeu1Ssp54Kghw1PwbGK5gNq9yRVJu0wjA,1474
|
22
22
|
brainstate/compile/_ad_checkpoint.py,sha256=HM6L90HU0N84S30uJpX8wqTO0ZcDnctqmwf8qFlkDYo,9358
|
23
23
|
brainstate/compile/_ad_checkpoint_test.py,sha256=XGqC8kjwKd64RPgBWXHAE3t8NdIXVUqmGDfrg5HqoVw,1743
|
24
|
-
brainstate/compile/_conditions.py,sha256=
|
24
|
+
brainstate/compile/_conditions.py,sha256=Pkvkc1Im7_ythKa9nwrUCNxYwkZri78I91MKbo1lEX8,10183
|
25
25
|
brainstate/compile/_conditions_test.py,sha256=bh8_D49Fl-s_xFYkO4joZJPgFGhw_vd6Wo8QB1HDKwE,8640
|
26
26
|
brainstate/compile/_error_if.py,sha256=l8flahWEui9-9IavtZQjyutIeR8DU0jieahRvAXUxuw,2651
|
27
27
|
brainstate/compile/_error_if_test.py,sha256=PjTIQOflegqnqJb9kO5YqwjW1OfrBmAtWlY_xn8rtDY,1897
|
@@ -31,22 +31,22 @@ brainstate/compile/_loop_collect_return.py,sha256=qOYGoD2TMZd2Px6y241GWNwSjOLyaK
|
|
31
31
|
brainstate/compile/_loop_collect_return_test.py,sha256=pEJdcOthEM17q5kXYhgR6JfzzqibijD_O1VPXVe_Ml4,1808
|
32
32
|
brainstate/compile/_loop_no_collection.py,sha256=tPkSxee41VexWEALpN1uuT78BDrX3uT1FHv8WZtov4c,7549
|
33
33
|
brainstate/compile/_loop_no_collection_test.py,sha256=ivavF59xep_g9bV1SSdXd5E1f6nhc7EUBfcbgHpxbfg,1419
|
34
|
-
brainstate/compile/_make_jaxpr.py,sha256=
|
34
|
+
brainstate/compile/_make_jaxpr.py,sha256=3VYwfjmHSp5Uh_VEQVXYgxsUcpWcDN_2tNnZKh1dFV0,37736
|
35
35
|
brainstate/compile/_make_jaxpr_test.py,sha256=xPusEJikMQRfoOmUFrugGcE5UpRm0giHoL_NPomN5rI,4791
|
36
|
-
brainstate/compile/_progress_bar.py,sha256=
|
36
|
+
brainstate/compile/_progress_bar.py,sha256=AhAyyI_ckzgaj0PSj1ep1hq8rGzQLSyC2aVCYaT-e-o,7502
|
37
37
|
brainstate/compile/_unvmap.py,sha256=9S42MeTmFJa8nfBI_AjEfrAdUsDmM3KFat59O8zXIEw,4120
|
38
38
|
brainstate/compile/_util.py,sha256=QD7lvS4Zb3P2HPNIm6mG8Rl_Lk2tQj0znOCPcH95XnI,6275
|
39
39
|
brainstate/functional/__init__.py,sha256=j6-3Er4fgqWpvntzYCZVB3e5hoz-Z3aqvapITCuDri0,1107
|
40
40
|
brainstate/functional/_activations.py,sha256=3ym1oDdftVxYlHIXWdS7XONiDFaDklqokIioi4qrsHo,21688
|
41
|
-
brainstate/functional/_activations_test.py,sha256=
|
41
|
+
brainstate/functional/_activations_test.py,sha256=3YR43Jyls2wWYKI-phsf6b1ZdgZa578ob1TfkitroMI,13559
|
42
42
|
brainstate/functional/_normalization.py,sha256=_F5u9iJm8KJfxlnmV_LwJXtrAZOJj357aXc_sfGe4CQ,2567
|
43
43
|
brainstate/functional/_others.py,sha256=iAqvLCmXQz6C80EjE0-5bwXCBKHoKqsggneiOAXNmQo,1699
|
44
44
|
brainstate/functional/_spikes.py,sha256=YJ4pa5LlywximSE6ZAAs9g2k-8cO95mwxdD29HhT-oM,7051
|
45
45
|
brainstate/graph/__init__.py,sha256=noo4TjBg6iEhjjwk0sAGUhR7Ge-z8Vnc2rLYUvnqttw,1295
|
46
46
|
brainstate/graph/_graph_node.py,sha256=kl0CDKIcbXd9YzrZIKDhDeT8bboaoR5_OPwtL90eUEo,6835
|
47
47
|
brainstate/graph/_graph_node_test.py,sha256=g6nrCCI-awfxhZLnjmYhfQvynumWJjz7fPxgIF-VSr4,2832
|
48
|
-
brainstate/graph/_graph_operation.py,sha256=
|
49
|
-
brainstate/graph/_graph_operation_test.py,sha256=
|
48
|
+
brainstate/graph/_graph_operation.py,sha256=nIOW0GsA3Yeh8X_ijw5wx4hQgY2sh4knVMt5ouG2Sn0,63975
|
49
|
+
brainstate/graph/_graph_operation_test.py,sha256=xgHoHXAafEhOqISDKLqYxb-wmMrUpv2PLtH5OLZausI,19729
|
50
50
|
brainstate/init/__init__.py,sha256=R1dHgub47o-WJM9QkFLc7x_Q7GsyaKKDtrRHTFPpC5g,1097
|
51
51
|
brainstate/init/_base.py,sha256=A5VIJV_xPyCD4Lo4RXe2WPlWvADAy_UPhexuwzp-6EI,1633
|
52
52
|
brainstate/init/_generic.py,sha256=o60EPJZe7laJgPsgrnorl3Km_Lc_Lr4qQQKmu6g5G4o,7992
|
@@ -55,36 +55,36 @@ brainstate/init/_random_inits_test.py,sha256=c1pUdWXQxL-seEvjO_8fBkaDL6T63b6ALNf
|
|
55
55
|
brainstate/init/_regular_inits.py,sha256=tcZDTXR8jiRqERuJleg_9JRGGzJj-V3LhTMcr_gt_k0,3149
|
56
56
|
brainstate/init/_regular_inits_test.py,sha256=bvv0AOfLOEP0BIQIBLztKw3EPyEp7n2fHW8PUrmWuHk,1820
|
57
57
|
brainstate/nn/__init__.py,sha256=nDIBDlzHaBy-vk4cb7FiPO6zoNe2tI5qvHIK8O7yrOU,3721
|
58
|
-
brainstate/nn/_collective_ops.py,sha256=
|
58
|
+
brainstate/nn/_collective_ops.py,sha256=Mmg-0ImuGvpv2qggu5wfBrA0MLBaq96D0P5DCZ3yolY,17418
|
59
59
|
brainstate/nn/_collective_ops_test.py,sha256=bwq0DApcsk0_2xpxMl0_e2cGKT63g5rSngpigCm07ps,1409
|
60
|
-
brainstate/nn/_common.py,sha256=
|
60
|
+
brainstate/nn/_common.py,sha256=qHAOID_eeKiPUXk_ION65sbYXyF-ddH5w5BayvH8Thg,6431
|
61
61
|
brainstate/nn/_conv.py,sha256=Zk-yj34n6CkjntcM9xpMGLTxKNfWdIWsTsoGbtdL0yU,18448
|
62
62
|
brainstate/nn/_conv_test.py,sha256=2lcUTG7twkyhuyKwuBux-NgU8NU_W4Cp1-G8EyDJ_uk,8862
|
63
63
|
brainstate/nn/_delay.py,sha256=l36FBgNhfL64tM3VGOsJNTtKr44HjxxtBWMFFCm3Pks,17361
|
64
64
|
brainstate/nn/_dropout.py,sha256=Dq3hQrOBT6gODlDbcoag6zLGXTU_p_2MhnmVsV57Hds,17783
|
65
|
-
brainstate/nn/_dropout_test.py,sha256=
|
66
|
-
brainstate/nn/_dynamics.py,sha256=
|
65
|
+
brainstate/nn/_dropout_test.py,sha256=L46PvC2OA7EnS4MsRhh_YnvKheHYNafOsKM8uzux_zo,4446
|
66
|
+
brainstate/nn/_dynamics.py,sha256=PTTGDqe-uRvrTZbhNGy1O4hT_wG4vxbOXyfbOx2itaw,48341
|
67
67
|
brainstate/nn/_dynamics_test.py,sha256=w7AV57LdhbBNYprdFpKq8MFSCbXKVkGgp_NbL3ANX3I,2769
|
68
|
-
brainstate/nn/_elementwise.py,sha256=
|
68
|
+
brainstate/nn/_elementwise.py,sha256=l3Wk65UDLFc3xFH1jwTXRwKAVmt3dUeG0iF_Al0w1_0,33487
|
69
69
|
brainstate/nn/_elementwise_test.py,sha256=_dd9eX2ZJ7p24ahuoapCaRTZ0g1boufXMyqHFx1d4WY,5688
|
70
70
|
brainstate/nn/_embedding.py,sha256=SaAJbgXmuJ8XlCOX9ob4yvmgh9Fk627wMguRzJMJ1H8,2138
|
71
|
-
brainstate/nn/_exp_euler.py,sha256=
|
71
|
+
brainstate/nn/_exp_euler.py,sha256=WTpZm-XQmsdMLNazY7wIu8eeO6pK0kRzt2lJnhEgMIk,3293
|
72
72
|
brainstate/nn/_exp_euler_test.py,sha256=XD--qMbGHrHa3WtcPMmJKk59giDcEhSqZuBOmTNYUr8,1227
|
73
73
|
brainstate/nn/_fixedprob.py,sha256=KGXohiU0wZnFIQDuwiRUTFsbsr8R0p8zgi5UZDuv1Bk,10004
|
74
74
|
brainstate/nn/_fixedprob_test.py,sha256=qbRBh-MpMtEOsg492gFu2w9-FOP9z_bXapm-Q0gLLYM,3929
|
75
|
-
brainstate/nn/_inputs.py,sha256=
|
76
|
-
brainstate/nn/_linear.py,sha256=
|
75
|
+
brainstate/nn/_inputs.py,sha256=hMPkx9qDBpJWPshZXLF4H1QiYK1-46wntHUIlG7cT7c,20603
|
76
|
+
brainstate/nn/_linear.py,sha256=FnPxATdT66DecjTW0tUTyL6clQmN_cG8kPC3qDWUE6A,14500
|
77
77
|
brainstate/nn/_linear_mv.py,sha256=6hDXx4yPqRSa7uIsW9f9eJuy23dcXN9Mp2_lSvw8BDA,2635
|
78
78
|
brainstate/nn/_linear_mv_test.py,sha256=ZCM1Zy6mImQfCfdZOGnTwkiLLPXK5yalv1Ts9sWZuPA,3864
|
79
79
|
brainstate/nn/_linear_test.py,sha256=eIS-VCR3QmXB_byO1Uexg65Pv48CBRUA_Je-UGrFVTY,2925
|
80
80
|
brainstate/nn/_ltp.py,sha256=_najNUyfaFYcOlUTm7ThJopInbos3kwJyrm-QUfI-hc,861
|
81
|
-
brainstate/nn/_module.py,sha256=
|
82
|
-
brainstate/nn/_module_test.py,sha256=
|
81
|
+
brainstate/nn/_module.py,sha256=jlFaoltT2F8a7cxsyu6fXp7mfIkEsk-JD3G1Xh3Ay8I,12783
|
82
|
+
brainstate/nn/_module_test.py,sha256=sjT7t-N4ZZKPN_MujNv8bcT5uZQD-CmU5nKz9KwlBUc,8963
|
83
83
|
brainstate/nn/_neuron.py,sha256=2walTScvL034LS53pArDASXz6z26SSPbmCvchWWjkUU,27441
|
84
84
|
brainstate/nn/_neuron_test.py,sha256=QF8pixUqA5Oj7MrNi2NR8VAnfGpAvNpwV2mBc3e_pTY,6393
|
85
|
-
brainstate/nn/_normalizations.py,sha256=
|
86
|
-
brainstate/nn/_normalizations_test.py,sha256=
|
87
|
-
brainstate/nn/_poolings.py,sha256=
|
85
|
+
brainstate/nn/_normalizations.py,sha256=YSC1W7JaexoZ8tKcy5B-dm-_x8GuPzS_6XBfkaKpdXM,37464
|
86
|
+
brainstate/nn/_normalizations_test.py,sha256=56YfszPQW9y3VoX90-seyLeWDX8akYQTRLNBvrobmS0,2498
|
87
|
+
brainstate/nn/_poolings.py,sha256=yKG9BLnvDvZb7HMrAt4Y1sLCjFQ8UmWfSSQmICAPWag,47137
|
88
88
|
brainstate/nn/_poolings_test.py,sha256=qje9PVWvPGiYOv6UlTEWfpqqjpv4Xop5rO0ATcgcF0w,7497
|
89
89
|
brainstate/nn/_projection.py,sha256=_TW-YmfPqUDkekMMK7tXrdLbjT4Ou2sUAecTNNn7FVM,17498
|
90
90
|
brainstate/nn/_rate_rnns.py,sha256=OQHMyq9kKd2q44dOHLuTqHKTGuraPMqXVutFP_LYIyU,20676
|
@@ -92,40 +92,40 @@ brainstate/nn/_rate_rnns_test.py,sha256=__hhx7e6LX_1mDLLQyIi4TNCaFAWnOVSTIgwHNjz
|
|
92
92
|
brainstate/nn/_readout.py,sha256=OJjSba5Wr7dtUXqYhAv1D7BUGOI-lAmg6urxPBrZe3c,7116
|
93
93
|
brainstate/nn/_readout_test.py,sha256=L2T0-SkiACxkY_I5Pbnbmy0Zw3tbpV3l5xVzAw42f2g,2136
|
94
94
|
brainstate/nn/_stp.py,sha256=-ahDEqSp8bQsU_nUK4jks8fjMYKgIbO0v7zpyGVuXtA,8645
|
95
|
-
brainstate/nn/_synapse.py,sha256=
|
95
|
+
brainstate/nn/_synapse.py,sha256=E43DxH0PW3pa6rKn9UWkD_PxIdpMAo04Yy41gaR3KPc,19868
|
96
96
|
brainstate/nn/_synapse_test.py,sha256=xmCWFxZUIM2YtmW5otKnADGCCK__4JpXmSYcZ3wzlQM,4994
|
97
97
|
brainstate/nn/_synaptic_projection.py,sha256=UFgzsMB1VZ9ieumwmaTIC7irLrZ4pmwfiuOYomkwXG4,17917
|
98
98
|
brainstate/nn/_synouts.py,sha256=jWQP1-qXFpdYgyUSJNFD7_bk4_-67ok36br-OzbcSXY,4524
|
99
99
|
brainstate/nn/_synouts_test.py,sha256=sfjotlS--4hT22Vb5RfmpfmXABa8z-VdxZYUSocMmlU,2244
|
100
|
-
brainstate/nn/_utils.py,sha256=
|
101
|
-
brainstate/nn/metrics.py,sha256=
|
100
|
+
brainstate/nn/_utils.py,sha256=nmp6MRQoKJhfxkbbnZJEyhyMQ4DZh8FNN_JQsl55kHE,3130
|
101
|
+
brainstate/nn/metrics.py,sha256=kFhUZRowtk4IoBIOPbENO4KezA6ZW_AxLAVknKFiL-s,14728
|
102
102
|
brainstate/optim/__init__.py,sha256=7Ao0LCtDNAoxSRSXiLLKnd1_4mR2GSExizpN38il-Fo,1195
|
103
103
|
brainstate/optim/_base.py,sha256=P37k8w46iQZZZnFLa5OF83Sb8DLQfYMez9ZRObBqVsE,1835
|
104
104
|
brainstate/optim/_lr_scheduler.py,sha256=0t7kl35MLmc0UcSu587nI28cI3SohYhy_19Al-5dNTM,15289
|
105
105
|
brainstate/optim/_lr_scheduler_test.py,sha256=gzzd_rzgtDWzF-93mujg043jv2wO9IceXGKiIYw5_ko,1790
|
106
|
-
brainstate/optim/_optax_optimizer.py,sha256=
|
106
|
+
brainstate/optim/_optax_optimizer.py,sha256=eNaHge-9URe82WvIGDGrWrAr0MAkYWe4eCsTwijJlbU,5337
|
107
107
|
brainstate/optim/_optax_optimizer_test.py,sha256=GVcszbNxBZ4z54bS5r-zDzP8gQZl7s5IsEZEd6G2gLo,1775
|
108
108
|
brainstate/optim/_sgd_optimizer.py,sha256=Fn4CdGaDfV4qc_4gacCcGSjit5-ZrsBbQP-KB0Ocdac,46110
|
109
109
|
brainstate/random/__init__.py,sha256=c5q-RC3grRIjx-HBb2IhKZpi_xzbFmUUxzRAzqfREic,1045
|
110
|
-
brainstate/random/_rand_funs.py,sha256=
|
111
|
-
brainstate/random/_rand_funs_test.py,sha256=
|
112
|
-
brainstate/random/_rand_seed.py,sha256=
|
110
|
+
brainstate/random/_rand_funs.py,sha256=0OY5kqEVrA2im-uKW2Rown0iIy7F0u54hGXHKxAP-go,137905
|
111
|
+
brainstate/random/_rand_funs_test.py,sha256=1K6bT6hhOPhomE-AMyPpT6MtG6ewANRSb5bJSU-ysYc,20690
|
112
|
+
brainstate/random/_rand_seed.py,sha256=ROpPgopGyL2ITNWJAM25NYjTyBizUoC4LzPUX-JpTpk,5998
|
113
113
|
brainstate/random/_rand_seed_test.py,sha256=waXXfch57X1XE1zDnCRokT6ziZOK0g-lYE80o6epDYM,1536
|
114
|
-
brainstate/random/_rand_state.py,sha256=
|
114
|
+
brainstate/random/_rand_state.py,sha256=hQ_govRxfIgsmtFe_V2B-jftqiMWRWrd9wkviPFOziY,55523
|
115
115
|
brainstate/random/_random_for_unit.py,sha256=kGp4EUX19MXJ9Govoivbg8N0bddqOldKEI2h_TbdONY,2057
|
116
116
|
brainstate/util/__init__.py,sha256=6efwr63osmqviNU_6_Nufag19PwxRDFvDAZrq6sH5yo,1555
|
117
|
-
brainstate/util/_pretty_pytree_test.py,sha256=Dn0TdjX6wLBXaTD4jfYTu6cKfFHwKSxi4_3bX7kB_IA,5621
|
118
117
|
brainstate/util/caller.py,sha256=RBRwu1HT_Lww7EE3WTjzrwwKqVWg7dn_JXKmO9ojM38,2752
|
119
118
|
brainstate/util/error.py,sha256=GBLaU_glQlgdrjBYIMiO3Dy5N_ST6-QNsgAOa9kjUjw,1757
|
120
119
|
brainstate/util/filter.py,sha256=skuq51y0P5-N611fQ-zB2QyaJIFqN_WbROzZHv0RgOc,14086
|
121
120
|
brainstate/util/others.py,sha256=vGo4uW0vd7wL5DYtxKWqXhoNmI-O_p26HsucoMnhdVA,16407
|
122
|
-
brainstate/util/pretty_pytree.py,sha256=
|
121
|
+
brainstate/util/pretty_pytree.py,sha256=ROrOO03fxq2NvsZHlz1XG7B4NhAjHXavPjh179GUwG4,33604
|
122
|
+
brainstate/util/pretty_pytree_test.py,sha256=64x2c9teehF_UoozCuuJ9WQj_287cTOTV1x58jxOTv8,5914
|
123
123
|
brainstate/util/pretty_repr.py,sha256=7Xp7IFNUeP7cGlpvwwJyBslbQVnXEqC1I6neV1Jx1S8,10527
|
124
124
|
brainstate/util/pretty_table.py,sha256=uJVaamFGQ4nKP8TkEGPWXHpzjMecDo2q1Ah6XtRjdPY,108117
|
125
125
|
brainstate/util/scaling.py,sha256=U6DM-afPrLejiGqo1Nla7z4YbTBVicctsBEweurr_mk,7524
|
126
|
-
brainstate/util/struct.py,sha256=
|
127
|
-
brainstate-0.1.
|
128
|
-
brainstate-0.1.
|
129
|
-
brainstate-0.1.
|
130
|
-
brainstate-0.1.
|
131
|
-
brainstate-0.1.
|
126
|
+
brainstate/util/struct.py,sha256=2Y_wuDFQ6ldl_H4_w0IjzAtkbHooVgdsVbnT7Z6_Efc,17528
|
127
|
+
brainstate-0.1.6.dist-info/LICENSE,sha256=VZe9u1jgUL2eCY6ZPOYgdb8KCblCHt8ECdbtJid6e1s,11550
|
128
|
+
brainstate-0.1.6.dist-info/METADATA,sha256=PsI82NGU6Zeh18JitOiA0jnEgullQ5aA_tl4zdl4Iqw,4122
|
129
|
+
brainstate-0.1.6.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
130
|
+
brainstate-0.1.6.dist-info/top_level.txt,sha256=eQbGgKn0ptx7FDWuua0V0wr4K1VHi2iOUCYo3fUQBRA,11
|
131
|
+
brainstate-0.1.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|