|
17 | 17 | __version__ = "2.7.5" |
18 | 18 | __version_info__ = tuple(map(int, __version__.split("."))) |
19 | 19 |
|
20 | | - |
21 | 20 | from brainpy import _errors as errors |
22 | | -from brainpy import mixin |
23 | 21 | # fundamental supporting modules |
24 | 22 | from brainpy import check, tools |
25 | 23 | # Part: Math Foundation # |
26 | 24 | # ----------------------- # |
27 | 25 | # math foundation |
28 | 26 | from brainpy import math |
| 27 | +from brainpy import mixin |
29 | 28 | # Part: Toolbox # |
30 | 29 | # --------------- # |
31 | 30 | # modules of toolbox |
|
109 | 108 | # ---------------- # |
110 | 109 | from brainpy.train.base import (DSTrainer as DSTrainer, ) |
111 | 110 | from brainpy.train.back_propagation import (BPTT as BPTT, |
112 | | - BPFF as BPFF, ) |
| 111 | + BPFF as BPFF, ) |
113 | 112 | from brainpy.train.online import (OnlineTrainer as OnlineTrainer, |
114 | | - ForceTrainer as ForceTrainer, ) |
| 113 | + ForceTrainer as ForceTrainer, ) |
115 | 114 | from brainpy.train.offline import (OfflineTrainer as OfflineTrainer, |
116 | | - RidgeTrainer as RidgeTrainer, ) |
| 115 | + RidgeTrainer as RidgeTrainer, ) |
117 | 116 |
|
118 | 117 | # Part: Analysis # |
119 | 118 | # ---------------- # |
|
147 | 146 |
|
148 | 147 | optimizers = optim |
149 | 148 |
|
150 | | -try: |
151 | | - import brainpy.state as state |
152 | | -except: |
153 | | - pass |
154 | | - |
155 | 149 |
|
| 150 | +# New package |
| 151 | +from brainpy import state |
156 | 152 |
|
157 | | -if __name__ == '__main__': |
158 | | - connect |
159 | | - initialize, # weight initialization |
160 | | - optim, # gradient descent optimizers |
161 | | - losses, # loss functions |
162 | | - measure, # methods for data analysis |
163 | | - inputs, # methods for generating input currents |
164 | | - encoding, # encoding schema |
165 | | - checkpoints, # checkpoints |
166 | | - check, # error checking |
167 | | - mixin, # mixin classes |
168 | | - algorithms, # online or offline training algorithms |
169 | | - check, tools, errors, math |
170 | | - BrainPyObject, |
171 | | - integrators, ode, sde, fde |
172 | | - Integrator, JointEq, IntegratorRunner, odeint, sdeint, fdeint |
173 | | - DynamicalSystem, DynSysGroup, Sequential, Dynamic, Projection |
174 | | - receive_update_input, receive_update_output, not_receive_update_input, not_receive_update_output |
175 | | - VarDelay |
176 | | - dnn, layers, dyn |
177 | | - NeuGroup, NeuGroupNS |
178 | | - share |
179 | | - reset_level, reset_state, save_state, load_state, clear_input |
180 | | - DSRunner, LoopOverTime, running |
181 | | - DSTrainer, BPTT, BPFF, OnlineTrainer, ForceTrainer, |
182 | | - OfflineTrainer, RidgeTrainer |
183 | | - analysis |
184 | | - visualize |
185 | | - train |
186 | | - channels, neurons, synapses, rates, synouts, synplast |
187 | | - Base |
188 | | - ArrayCollector, Collector, errors |
0 commit comments