Skip to content

Commit ae7b023

Browse files
committed
chore: remove obsolete documentation files for tether modules
1 parent bebad32 commit ae7b023

File tree

7 files changed

+8
-111
lines changed

7 files changed

+8
-111
lines changed

docs/modules.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/tether.functional.rst

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/tether.kernels.rst

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/tether.nn.rst

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/tether.rst

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/tether/data/encoding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def rate_encoding(x: torch.Tensor, n_steps: int, gain: float = 1.0) -> torch.Ten
3232
Returns
3333
-------
3434
torch.Tensor
35-
Spike tensor with shape (n_steps, *x.shape).
35+
Spike tensor with shape (n_steps, \*x.shape).
3636
"""
3737
shape = (n_steps,) + x.shape
3838
prob = torch.clamp(x * gain, 0.0, 1.0)
@@ -62,7 +62,7 @@ def latency_encoding(x: torch.Tensor, n_steps: int, tau: float = 1.0, threshold:
6262
Returns
6363
-------
6464
torch.Tensor
65-
Spike tensor with shape (n_steps, *x.shape).
65+
Spike tensor with shape (n_steps, \*x.shape).
6666
"""
6767
# Calculate fire time: t_f = tau * ln(x / (x - theta)) ?
6868
# Or simplified: t_f = (1 - x) * n_steps

src/tether/nn/surrogates.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ def get_id(self):
3232
raise NotImplementedError
3333

3434
class Arctan(Surrogate):
35-
"""
35+
r"""
3636
Arctan surrogate gradient.
3737
3838
The surrogate derivative is given by:
39+
3940
.. math::
4041
f'(x) = \\frac{1}{1 + (\\alpha \\pi x)^2}
4142
@@ -45,10 +46,11 @@ def get_id(self):
4546
return 0
4647

4748
class Sigmoid(Surrogate):
48-
"""
49+
r"""
4950
Sigmoid surrogate gradient.
5051
5152
The surrogate function is a sigmoid, and its derivative is:
53+
5254
.. math::
5355
f'(x) = \\alpha \\cdot \\sigma(\\alpha x) \\cdot (1 - \\sigma(\\alpha x))
5456
@@ -58,10 +60,11 @@ def get_id(self):
5860
return 1
5961

6062
class FastSigmoid(Surrogate):
61-
"""
63+
r"""
6264
Fast Sigmoid (approximated) surrogate gradient.
6365
6466
Uses a computationally cheaper approximation of the sigmoid derivative:
67+
6568
.. math::
6669
f'(x) = \\frac{1}{(1 + |\\alpha x|)^2}
6770

0 commit comments

Comments
 (0)