brainstate 0.1.0.post20250217__py2.py3-none-any.whl → 0.1.0.post20250218__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/_state.py CHANGED
@@ -44,7 +44,12 @@ from brainstate.util import DictManager, PrettyObject
44
44
  from brainstate.util.filter import Nothing
45
45
 
46
46
  __all__ = [
47
- 'State', 'ShortTermState', 'LongTermState', 'HiddenState', 'ParamState', 'TreefyState',
47
+ 'State',
48
+ 'ShortTermState',
49
+ 'LongTermState',
50
+ 'HiddenState',
51
+ 'ParamState',
52
+ 'TreefyState',
48
53
  'FakeState',
49
54
 
50
55
  'StateDictManager',
@@ -956,21 +961,18 @@ class BatchState(LongTermState):
956
961
 
957
962
  class HiddenState(ShortTermState):
958
963
  """
959
- The hidden state, which is used to store the hidden data in a dynamic model.
964
+ Represents hidden state variables in neurons or synapses.
960
965
 
961
966
  This class extends :class:`ShortTermState` and is specifically designed to represent
962
967
  and manage hidden states within dynamic models, such as recurrent neural networks.
963
968
  It provides a way to encapsulate hidden state values and associated metadata,
964
969
  facilitating operations like state updates during model execution.
965
970
 
966
- Attributes:
967
- Inherits all attributes from :class:`ShortTermState`.
968
-
969
971
  Note:
970
- This class does not introduce new methods or attributes beyond those
971
- inherited from :class:`ShortTermState`. Its primary purpose is to semantically
972
- distinguish hidden states from other types of short-term states
973
- in dynamic models.
972
+ :class:`HiddenState` and :class:`ParamState` are two most important state types
973
+ in brainstate. The former is used to store the hidden states in neurons, synapses,
974
+ or networks. The latter is used to store the trainable parameters in the model,
975
+ such as synaptic weights.
974
976
 
975
977
  Example:
976
978
  >>> lstm_hidden = HiddenState(np.zeros(128), name="lstm_hidden_state")
@@ -989,14 +991,11 @@ class ParamState(LongTermState):
989
991
  It provides a way to encapsulate parameter values and associated metadata,
990
992
  facilitating operations like parameter updates during training.
991
993
 
992
- Attributes:
993
- Inherits all attributes from :class:`LongTermState`.
994
-
995
994
  Note:
996
- This class does not introduce new methods or attributes beyond those
997
- inherited from :class:`LongTermState`. Its primary purpose is to semantically
998
- distinguish parameter states from other types of long-term states
999
- in the model.
995
+ :class:`HiddenState` and :class:`ParamState` are two most important state types
996
+ in brainstate. The former is used to store the hidden states in neurons, synapses,
997
+ or networks. The latter is used to store the trainable parameters in the model,
998
+ such as synaptic weights.
1000
999
 
1001
1000
  Example:
1002
1001
  >>> weight = ParamState(np.random.randn(10, 10), name="layer1_weights")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: brainstate
3
- Version: 0.1.0.post20250217
3
+ Version: 0.1.0.post20250218
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
@@ -1,5 +1,5 @@
1
1
  brainstate/__init__.py,sha256=AkZyyFkn4fB8g2aT6Rc2MO1xICPpUZuDtdze-eUQNc0,1496
2
- brainstate/_state.py,sha256=5Oc-QPyQbfwUSAiTTa9BYh64QKI3xL54nvGwQr2KHBs,60827
2
+ brainstate/_state.py,sha256=KJclcHKGrIt8K_rDW3E2dO8g_f_UMcZwGID4UUb9MBE,60751
3
3
  brainstate/_state_test.py,sha256=UBbbGJ8cb9dJ3NeySf-TNs_nNP47Ax8CP7QL_b32MAA,1636
4
4
  brainstate/_utils.py,sha256=uJ6WWKq3yb05ZdktCQGLWOXsOJveL1H9pR7eev70Jes,1693
5
5
  brainstate/environ.py,sha256=PllYYZKqany3G7NzIwoUPplLAePbyza6kJGXTPgJK-c,17698
@@ -121,8 +121,8 @@ brainstate/util/_pretty_table.py,sha256=NM_6VAW6oL9jojsK0-RkQGHnDzLy_fn_hgzl5R8o
121
121
  brainstate/util/_scaling.py,sha256=pc_eM_SZVwkY65I4tJh1ODiHNCoEhsfFXl2zBK0PLAg,7562
122
122
  brainstate/util/_struct.py,sha256=F5GfFURITAIYTwf17_xypkZU1wvoL4dUCviPnr_eCtw,17515
123
123
  brainstate/util/filter.py,sha256=Zw0H42NwAi2P7dBr3ISv2VpkB5jqoWnV4Kpd61gq66o,14126
124
- brainstate-0.1.0.post20250217.dist-info/LICENSE,sha256=VZe9u1jgUL2eCY6ZPOYgdb8KCblCHt8ECdbtJid6e1s,11550
125
- brainstate-0.1.0.post20250217.dist-info/METADATA,sha256=eBHppB4DxysakCjcinzG4vVSxI_eS08l7LkSepmGGXI,3585
126
- brainstate-0.1.0.post20250217.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
127
- brainstate-0.1.0.post20250217.dist-info/top_level.txt,sha256=eQbGgKn0ptx7FDWuua0V0wr4K1VHi2iOUCYo3fUQBRA,11
128
- brainstate-0.1.0.post20250217.dist-info/RECORD,,
124
+ brainstate-0.1.0.post20250218.dist-info/LICENSE,sha256=VZe9u1jgUL2eCY6ZPOYgdb8KCblCHt8ECdbtJid6e1s,11550
125
+ brainstate-0.1.0.post20250218.dist-info/METADATA,sha256=INsdNphwnxGh07Urn2gjiOYzPEEQ8Lcr19bugHUYrU4,3585
126
+ brainstate-0.1.0.post20250218.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
127
+ brainstate-0.1.0.post20250218.dist-info/top_level.txt,sha256=eQbGgKn0ptx7FDWuua0V0wr4K1VHi2iOUCYo3fUQBRA,11
128
+ brainstate-0.1.0.post20250218.dist-info/RECORD,,