Skip to content

Commit 5590c4d

Browse files
committed
Fix docstring
1 parent dbcc23f commit 5590c4d

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

deepxde/backend.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ def backend():
2626
tuple: A ``tuple`` of the name and version of the backend DeepXDE is currently using.
2727
2828
Examples:
29-
```python
29+
30+
.. code-block:: python
31+
3032
>>> dde.backend.backend()
3133
("tensorflow", 1.14.0)
32-
```
3334
"""
3435
return _BACKEND, _VERSION
3536

deepxde/maps/activations.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ def linear(x):
1212

1313
def layer_wise_locally_adaptive(activation, n=1):
1414
"""Layer-wise locally adaptive activation functions (L-LAAF).
15-
Jagtap et al., arXiv preprint arXiv:1909.12228, 2019.
1615
1716
Examples:
18-
To define a L-LAAF ReLU with the scaling factor ``n = 10``
19-
```python
17+
18+
To define a L-LAAF ReLU with the scaling factor ``n = 10``:
19+
20+
.. code-block:: python
21+
2022
n = 10
2123
activation = f"LAAF-{n} relu" # "LAAF-10 relu"
22-
```
24+
25+
References: `Jagtap et al., 2019 <https://arxiv.org/abs/1909.12228>`_.
2326
"""
2427
a = tf.Variable(1 / n, dtype=config.real(tf))
2528
return lambda x: activation(n * a * x)

0 commit comments

Comments
 (0)