You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Convert docstring section headers from rst underline format to :: format
- Fixes sphinx_autodoc_typehints extension errors
- Only modify the problematic Examples, Parameters, Returns sections
- Affects 21 core files with docstring formatting issues
Copy file name to clipboardExpand all lines: brainpy/_src/dnn/normalization.py
+26-26Lines changed: 26 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -52,8 +52,8 @@ class BatchNorm(Layer):
52
52
where :math:`\hat{x}` is the estimated statistic and :math:`x_t` is the
53
53
new observed value.
54
54
55
-
Parameters
56
-
----------
55
+
Parameters::
56
+
57
57
num_features: int
58
58
``C`` from an expected input of size ``(..., C)``.
59
59
axis: int, tuple, list
@@ -79,8 +79,8 @@ class BatchNorm(Layer):
79
79
Specifies how devices are grouped. Valid
80
80
only within ``jax.pmap`` collectives.
81
81
82
-
References
83
-
----------
82
+
References::
83
+
84
84
.. [1] Ioffe, Sergey and Christian Szegedy. “Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift.” ArXiv abs/1502.03167 (2015): n. pag.
85
85
86
86
"""
@@ -177,8 +177,8 @@ class BatchNorm1d(BatchNorm):
177
177
where :math:`\hat{x}` is the estimated statistic and :math:`x_t` is the
178
178
new observed value.
179
179
180
-
Parameters
181
-
----------
180
+
Parameters::
181
+
182
182
num_features: int
183
183
``C`` from an expected input of size ``(B, L, C)``.
184
184
axis: int, tuple, list
@@ -204,8 +204,8 @@ class BatchNorm1d(BatchNorm):
204
204
Specifies how devices are grouped. Valid
205
205
only within ``jax.pmap`` collectives.
206
206
207
-
References
208
-
----------
207
+
References::
208
+
209
209
.. [1] Ioffe, Sergey and Christian Szegedy. “Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift.” ArXiv abs/1502.03167 (2015): n. pag.
210
210
211
211
"""
@@ -260,8 +260,8 @@ class BatchNorm2d(BatchNorm):
260
260
where :math:`\hat{x}` is the estimated statistic and :math:`x_t` is the
261
261
new observed value.
262
262
263
-
Parameters
264
-
----------
263
+
Parameters::
264
+
265
265
num_features: int
266
266
``C`` from an expected input of size ``(B, H, W, C)``.
267
267
axis: int, tuple, list
@@ -287,8 +287,8 @@ class BatchNorm2d(BatchNorm):
287
287
Specifies how devices are grouped. Valid
288
288
only within ``jax.pmap`` collectives.
289
289
290
-
References
291
-
----------
290
+
References::
291
+
292
292
.. [1] Ioffe, Sergey and Christian Szegedy. “Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift.” ArXiv abs/1502.03167 (2015): n. pag.
293
293
294
294
"""
@@ -343,8 +343,8 @@ class BatchNorm3d(BatchNorm):
343
343
where :math:`\hat{x}` is the estimated statistic and :math:`x_t` is the
344
344
new observed value.
345
345
346
-
Parameters
347
-
----------
346
+
Parameters::
347
+
348
348
num_features: int
349
349
``C`` from an expected input of size ``(B, H, W, D, C)``.
350
350
axis: int, tuple, list
@@ -370,8 +370,8 @@ class BatchNorm3d(BatchNorm):
370
370
Specifies how devices are grouped. Valid
371
371
only within ``jax.pmap`` collectives.
372
372
373
-
References
374
-
----------
373
+
References::
374
+
375
375
.. [1] Ioffe, Sergey and Christian Szegedy. “Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift.” ArXiv abs/1502.03167 (2015): n. pag.
376
376
377
377
"""
@@ -422,8 +422,8 @@ class LayerNorm(Layer):
422
422
scale and bias to a whole example/whole channel, please use GroupNorm/
423
423
InstanceNorm.
424
424
425
-
Parameters
426
-
----------
425
+
Parameters::
426
+
427
427
normalized_shape: int, sequence of int
428
428
The input shape from an expected input of size
429
429
@@ -444,8 +444,8 @@ class LayerNorm(Layer):
444
444
has learnable per-element affine parameters initialized to ones (for weights)
445
445
and zeros (for biases). Default: ``True``.
446
446
447
-
Examples
448
-
--------
447
+
Examples::
448
+
449
449
>>> import brainpy as bp
450
450
>>> import brainpy.math as bm
451
451
>>>
@@ -519,8 +519,8 @@ class GroupNorm(Layer):
519
519
The shape of the data should be (b, d1, d2, ..., c), where `d` denotes the batch
520
520
size and `c` denotes the feature (channel) size.
521
521
522
-
Parameters
523
-
----------
522
+
Parameters::
523
+
524
524
num_groups: int
525
525
The number of groups. It should be a factor of the number of channels.
Copy file name to clipboardExpand all lines: brainpy/_src/dynold/neurons/fractional_models.py
+10-12Lines changed: 10 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -60,23 +60,22 @@ class FractionalFHR(FractionalNeuron):
60
60
relatively fixed time of bursting duration. With the increasing of :math:`a`, the
61
61
interburst intervals become shorter and periodic bursting changes to tonic spiking.
62
62
63
-
Examples
64
-
--------
65
-
63
+
Examples::
64
+
66
65
- [(Mondal, et, al., 2019): Fractional-order FitzHugh-Rinzel bursting neuron model](https://brainpy-examples.readthedocs.io/en/latest/neurons/2019_Fractional_order_FHR_model.html)
67
66
68
67
69
-
Parameters
70
-
----------
68
+
Parameters::
69
+
71
70
size: int, sequence of int
72
71
The size of the neuron group.
73
72
alpha: float, tensor
74
73
The fractional order.
75
74
num_memory: int
76
75
The total number of the short memory.
77
76
78
-
References
79
-
----------
77
+
References::
78
+
80
79
.. [1] Mondal, A., Sharma, S.K., Upadhyay, R.K. *et al.* Firing activities of a fractional-order FitzHugh-Rinzel bursting neuron model and its coupled dynamics. *Sci Rep* **9,** 15721 (2019). https://doi.org/10.1038/s41598-019-52061-4
81
80
"""
82
81
@@ -223,14 +222,13 @@ class FractionalIzhikevich(FractionalNeuron):
223
222
in mV. When the spike reaches its peak value, the membrane voltage :math:`v` and the
224
223
recovery variable :math:`u` are reset according to the above condition.
0 commit comments